Oh, some "quick responses" after almost 2 years.
User_Russian wrote:IMHO it would be useful if other gadgets, for instance the ComboBoxGadget, would support EventType() as well.
There is support In Windows
Code: Select all
If OpenWindow(0, 0, 0, 270, 140, "ComboBoxGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ComboBoxGadget(1, 10, 40, 250, 21)
For a = 1 To 5
AddGadgetItem(1, -1,"ComboBox item " + Str(a))
Next
SetGadgetState(1, 2) ; set (beginning with 0) the third item as active one
Repeat
Event=WaitWindowEvent()
Gadget=EventGadget()
Type=EventType()
If Event=#PB_Event_Gadget And Gadget=1
Debug Type
EndIf
Until Event = #PB_Event_CloseWindow
EndIf
a) When you look at the
help for EventType(), then you'll see that now (PB 4.40 Beta 5) the list of supported gadgets is exactly the same as the list which I posted 2 years ago. So either additional gadgets are not supported until now, or they are secretely supported and their support is not documented.
b) Well, your above code does do
something ...
But when you get the example code from the
help for EventType(), and just replace
Code: Select all
ListIconGadget(1, 10, 10, 150, 100, "ListIcon", 140, #PB_ListIcon_GridLines)
with
Code: Select all
ComboBoxGadget(1, 10, 10, 150, 20)
then e.g. clicking at an item with the
left mouse button results (with PB 4.40 Beta 5 on Windows XP x86) in the message
Debug wrote:Click with right mouse button
That's not what I meant when I wrote "support EventType()". Of course, all the constants documented in the help should have
the same meaning for all supported gadgets.
Regards, Little John