Seite 1 von 1

Radio Button question

Verfasst: 29.05.2025 21:29
von SPH
I've refined my code to show you the situation I'm in.
Revisit my code word for word and correct the "debug"
:praise:
Ich habe meinen Code verfeinert, um Ihnen die Situation zu zeigen, in der ich mich befinde.
Gehen Sie meinen Code Wort für Wort noch einmal durch und korrigieren Sie den „Debug“
:praise:
J'ai affiné mon code pour vous montrer la situation dans laquelle je me trouve.
Revoyez mon code mot pour mot et corrigez le « debug »
:praise:
Thanks

Code: Alles auswählen

If OpenWindow(0, 0, 0, 170, 160, "OptionGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    OptionGadget(0, 30, 20, 90, 20, "Option 1")
    OptionGadget(1, 30, 45, 90, 20, "Option 2")
    OptionGadget(2, 30, 70, 90, 20, "Option 3")
    
    SetGadgetState(1, 1)   ; sélectionne la deuxième option
    
    ButtonGadget(10, 30,  100, 100, 40, "Save")

  Repeat
    Event = WaitWindowEvent()
    
    If Event = #PB_Event_Gadget
      
      Select EventGadget()
        Case 10 ; save pref
        Debug "the radio button is : "+who
      EndSelect
      
    EndIf
    
  Until Event = #PB_Event_CloseWindow
  
EndIf

End

// Verschoben von "Code, Tipps und Tricks" nach "Fragen/Anfänger" (Kiffi)

Re: Radio Button question

Verfasst: 29.05.2025 22:55
von Kiffi