Bladeren bron

added Len() method to gui.DropDown

leonsal 8 jaren geleden
bovenliggende
commit
275bc85053
1 gewijzigde bestanden met toevoegingen van 6 en 0 verwijderingen
  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 {