Code: Select all
If OpenWindow(0, 100, 180, 200, 100, "Test")
OptionGadget(0, 10, 10, 80, 20, "option 1")
OptionGadget(1, 100, 10, 80, 20, "option 2")
ButtonGadget(2, 60, 50, 80, 20, "button")
Repeat
EvID=WaitWindowEvent()
Until EvID = #PB_Event_CloseWindow
EndIf
End Code: Select all
If OpenWindow(0, 100, 180, 200, 100, "Test")
OptionGadget(0, 10, 10, 80, 20, "option 1")
ButtonGadget(1, 60, 50, 80, 20, "button")
OptionGadget(2, 100, 10, 80, 20, "option 2")
Repeat
EvID=WaitWindowEvent()
Until EvID = #PB_Event_CloseWindow
EndIf
End Under Windows the 2nd example works fine, but you must insert SetGadgetState()
Code: Select all
If OpenWindow(0, 100, 180, 200, 100, "Test")
OptionGadget(0, 10, 10, 80, 20, "option 1")
ButtonGadget(1, 60, 50, 80, 20, "button")
OptionGadget(2, 100, 10, 80, 20, "option 2")
SetGadgetState(0, 1)
SetGadgetState(2, 0)
Repeat
EvID=WaitWindowEvent()
If EvID=#PB_Event_Gadget
Select EventGadget()
Case 0
SetGadgetState(0, 1)
SetGadgetState(2, 0)
Case 2
SetGadgetState(0, 0)
SetGadgetState(2, 1)
EndSelect
EndIf
Until EvID = #PB_Event_CloseWindow
EndIf
End 
