Actualy, on Windows :
- One event when the combo opens (EventType() = 7)
AND
- One event when the combo closes (EventType() = 1)
On MacOS :
- Only one event when the combo closes (EventType() = 0)
On Linux :
- Only one event when the combo closes (EventType() = 768)
Code: Select all
OpenWindow(0, 100, 100, 300, 200, "Combo event test")
ComboBoxGadget(0, 50, 50, 150, 30)
AddGadgetItem(0, -1, "Item 1")
AddGadgetItem(0, -1, "Item 2")
AddGadgetItem(0, -1, "Item 3")
Repeat
Select WaitWindowEvent()
Case #PB_Event_Gadget
Select EventGadget()
Case 0 ; ComboBox
Debug "ComboBox event : EventType() = " + Str(EventType())
EndSelect
Case #PB_Event_CloseWindow
Break
EndSelect
ForEver