Unified cross-platform events for ComboBoxes

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Niffo
Enthusiast
Enthusiast
Posts: 504
Joined: Tue Jan 31, 2006 9:43 am
Location: France

Unified cross-platform events for ComboBoxes

Post 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
Last edited by Niffo on Wed Jul 27, 2011 1:48 pm, edited 1 time in total.
Niffo
beo6
User
User
Posts: 17
Joined: Thu Mar 18, 2010 11:28 pm

Re: Unified cross-platform events for ComboBoxes

Post by beo6 »

i encountered this behavior too.
it would be nice if this would be changed in the future.
Post Reply