| |
|
|
Erasmus.Herold | Hallöchen ...
can someone in a small example (with z.B. 3 Radiobutton) explain, How I inquire can, which the three Button select watts?
from the Doku to that "GetCheck" erschließt itself I do not The Zuweisung To whom 3 Buttons of/ one group to the auszulesenden worth.
thanks for Support and the tiny example.
Greeting Erasmus |
|
|
| |
|
|
|
H.Brill |
Declare Long radio1, radio2, radio3, exit, end
end = 0
Window 600, 400
Create("GroupBox", %HWnd, "Meine Auswahl", 10, 10, 120, 140)
radio1 = Create("RadioButton", %HWnd, "Auswahl 1", 20, 40, 100, 25)
radio2 = Create("RadioButton", %HWnd, "Auswahl 2", 20, 80, 100, 25)
radio3 = Create("RadioButton", %HWnd, "Auswahl 3", 20, 120, 100, 25)
exit = Create("Button", %HWnd, "EXIT", 20, 180, 60, 25)
WhileNot end
Waitinput
If GetCheck(radio1)
DrawText 150, 50, "Radiobutton 1 chosen !"
ElseIf GetCheck(radio2)
DrawText 150, 50, "Radiobutton 2 chosen !"
ElseIf GetCheck(radio3)
DrawText 150, 50, "Radiobutton 3 chosen !"
EndIf
If Clicked(exit)
end = 1
EndIf
EndWhile
End
The GroupBox serves Yes only to Übersichtlichkeit. there need it too not absolutely a handle for. important is, that one GetCheck not with others Check-functions (z.B. Clicked) vermischt. there reacted the Button not any more on it, Why too always. therefore the extra If Clicked().
PS: GetCheck gives only True or False (1 or 0) back. what occur should, if of/ one on a this Radiobuttons pressing, remaining you give over. one can z.B. a variable with one designed worth fill. becomes vielfach uses, circa one form auszufüllen z.B. mr/woman where then the String s = "Herr" or s = "Frau" staid becomes. |
|
|
| Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 06/11/19 ▲ |
|
|
|
|
Erasmus.Herold | Thank you!
perfect declared. functions. |
|
|
| |
|
|
|
Jörg Sellmeyer | The Groupbox serves incidentally not to to grafischen Aufhübschung separate sortiert The Radiobuttons too in her function. therefore is it sinnvoller, The Groupbox to whom Buttons to create. The Buttons oberhalb the Groupboxzeile react then as self-contained Auswahlmöglichkeiten. an second group (or further) can then extra quizzed/markiert go. |
|
|
| |
|
|
|
Erasmus.Herold | |
|
| |
|
|
|
Georg Teles | Jörg was faster
The groups-welt becomes to optischen Gruppierung within Dialog boxes inserted, but too to that group the Radiobuttons.
here as example
Declare Long radio1, radio2, radio3, radio4, radio5, radio6, exit, end
end = 0
Window 600, 400
radio1 = Create("RadioButton", %HWnd, "Auswahl 1", 20, 40, 100, 25)
radio2 = Create("RadioButton", %HWnd, "Auswahl 2", 20, 80, 100, 25)
radio3 = Create("RadioButton", %HWnd, "Auswahl 3", 20, 120, 100, 25)
Create("GroupBox", %HWnd, "Meine Auswahl", 10, 10, 120, 140)
exit = Create("Button", %HWnd, "EXIT", 20, 180, 60, 25)
radio4 = Create("RadioButton", %HWnd, "Auswahl 4", 150, 40, 100, 25)
radio5 = Create("RadioButton", %HWnd, "Auswahl 5", 150, 80, 100, 25)
radio6 = Create("RadioButton", %HWnd, "Auswahl 6", 150, 120, 100, 25)
Create("GroupBox", %HWnd, "Meine selection 2", 140, 10, 120, 140)
WhileNot end
Waitinput
If GetCheck(radio1)
DrawText 300, 50, "Radiobutton 1 chosen !"
ElseIf GetCheck(radio2)
DrawText 300, 50, "Radiobutton 2 chosen !"
ElseIf GetCheck(radio3)
DrawText 300, 50, "Radiobutton 3 chosen !"
EndIf
If GetCheck(radio4)
DrawText 300, 70, "Radiobutton 4 chosen !"
ElseIf GetCheck(radio5)
DrawText 300, 70, "Radiobutton 5 chosen !"
ElseIf GetCheck(radio6)
DrawText 300, 70, "Radiobutton 6 chosen !"
EndIf
If Clicked(exit)
end = 1
EndIf
EndWhile
End
Regards |
|
|
| |
|
|
|
Erasmus.Herold | |
|
| |
|
|