Page 1 of 1

Unified cross-platform events for ComboBoxes

Posted: Tue Jul 06, 2010 2:21 pm
by Niffo
Please, is it possible to have an unified cross-platform set of events for Combo Box gadgets ?

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

Re: Unified cross-platform events for ComboBoxes

Posted: Sun Sep 05, 2010 7:07 pm
by beo6
i encountered this behavior too.
it would be nice if this would be changed in the future.