English
Forum

Radiobutton inquire

 

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
 
06/11/19  
 




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.
 
06/11/19  
 




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.
 
XProfan X4
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
06/12/19  
 




Erasmus.Herold
thanks for Zusatzinfo.
 
06/12/19  
 




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
 
XProfan X2
TC-Programming [...] 
XProfan 8.0 - 10.0 - X2 - X3 - X4

06/14/19  
 




Erasmus.Herold
thanks
 
06/15/19  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.533 Views

Untitledvor 0 min.
Thomas Freier02/11/21
N.Art11/18/20
iF09/24/20
Micha1233412/26/19
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie