浏览代码

added Len() method to gui.DropDown

leonsal 8 年之前
父节点
当前提交
275bc85053
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      gui/dropdown.go

+ 6 - 0
gui/dropdown.go

@@ -106,6 +106,12 @@ func (dd *DropDown) ItemAt(pos int) *ImageLabel {
 	return dd.list.ItemAt(pos).(*ImageLabel)
 }
 
+// Len returns the number of items in the dropdown's list.
+func (dd *DropDown) Len() int {
+
+	return dd.list.Len()
+}
+
 // Returns the currently selected item or nil if not item
 // was selected
 func (dd *DropDown) Selected() *ImageLabel {