Procházet zdrojové kódy

added Len() method to gui.DropDown

leonsal před 8 roky
rodič
revize
275bc85053
1 změnil soubory, kde provedl 6 přidání a 0 odebrání
  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 {