diff --git a/CHANGELOG.md b/CHANGELOG.md index 88754b2..384ea05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ * Added ModSize, RemSize, RoundSize, RoundUpSize, RoundDownSize, and RoundToZeroSize functions * Added Start, Stop, Pause, and Resume methods to Animation interface * Added "transform" property and Transform interface -* Added OpenRawResource function +* Added OpenRawResource, GetCheckboxChangedListeners functions * Added RemoveClientItem method to Session interface * Added NewPath and NewPathFromSvg methods to Canvas interface * Removed NewPath function diff --git a/checkbox.go b/checkbox.go index 39691ec..4613927 100644 --- a/checkbox.go +++ b/checkbox.go @@ -355,3 +355,10 @@ func GetCheckboxVerticalAlign(view View, subviewID ...string) int { func GetCheckboxHorizontalAlign(view View, subviewID ...string) int { return enumStyledProperty(view, subviewID, CheckboxHorizontalAlign, TopAlign, false) } + +// GetCheckboxChangedListeners returns the CheckboxChangedListener list of an Checkbox subview. +// If there are no listeners then the empty list is returned +// If the second argument (subviewID) is not specified or it is "" then a value from the first argument (view) is returned. +func GetCheckboxChangedListeners(view View, subviewID ...string) []func(Checkbox, bool) { + return getEventListeners[Checkbox, bool](view, subviewID, CheckboxChangedEvent) +} diff --git a/dropDownList.go b/dropDownList.go index 34589a9..460cd27 100644 --- a/dropDownList.go +++ b/dropDownList.go @@ -375,7 +375,7 @@ func (list *dropDownListData) setDisabledItems(value any) bool { list.disabledItems = disabledItems case []DataValue: - disabledItems := make([]string, 0, len(value)) + disabledItems := make([]any, 0, len(value)) for _, val := range value { if !val.IsObject() { disabledItems = append(disabledItems, val.Value())