Hi,
I am having a dropdown list and i want to append a new item to the list
before i could open the list. (Infact i would like to call a method
when i click on the list).
For that i trigger a PointerPress event.
My code is given below.
{let sample-list:DefaultListModel =
{DefaultListModel
"One"
}
}
{DropdownList
prompt = "Choose a state:",
data-model = list-of-states,
dropdown-height = 2in,
{on PointerPress at ddl:DropdownList
{Popup-message "Pointer Press Event"}
{ddl.append "One More"}
},
{on ValueFinished at ddl:DropdownList do
{popup-message
{text You have chosen the state of {value ddl.value}.}
}
}
}
But the contents are not updated or the event might not have been fired. What could be the best solution for this case.