For others gadget like stringGadget you can have acess to event with #PB_EventType_Change
Is there something similar with OptionGadget ?
Thanks
OptionGadget
Re: OptionGadget
Not really. But this provides a similar solution:loulou2522 wrote:For others gadget like stringGadget you can have acess to event with #PB_EventType_Change
Is there something similar with OptionGadget ?
Code: Select all
wFlags = #PB_Window_SystemMenu | #PB_Window_ScreenCentered
If OpenWindow(0, 0, 0, 200, 110, "OptionGadget", wFlags)
OptionGadget(0, 60, 20, 100, 20, "Option 1")
OptionGadget(1, 60, 45, 100, 20, "Option 2")
OptionGadget(2, 60, 70, 100, 20, "Option 3")
SetGadgetState(0, 1)
Repeat
event = WaitWindowEvent()
Select event
Case #PB_Event_CloseWindow
appQuit = 1
Case #PB_Event_Gadget
Select EventGadget()
Case 0 To 2
Debug "Selected Option: #" + Str(EventGadget() + 1)
EndSelect
EndSelect
Until appQuit
EndIf
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel