bug or feature?

Linux specific forum
lnxque
User
User
Posts: 30
Joined: Tue Jan 26, 2010 4:06 pm

bug or feature?

Post by lnxque »

There is a "strange" behavior regarding the optiongadget. 1st (default), work as expected.

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 
2nd, i want change the taborder, it seems to be something wrong.

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 
At least the question (if a feature ;-) - how to change the taborder.

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 
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: bug or feature?

Post by Fred »

Post Reply