Browsing this Thread:
1 Anonymous Users
|
Re: Need an example for radio button
|
||||
|---|---|---|---|---|
|
Home away from home
![]()
|
@mrdarek
Have you tried "guiRadio.setState(1)"?
Posted on: 2011/6/7 21:30
|
|||
|
||||
|
Re: Need an example for radio button
|
||||
|---|---|---|---|---|
|
Just can't stay away
![]() |
Thanks
OK, Code is tested and start working in my program. I have only one ask for future - how modify this code to on start first option was unchecked and second checked?
Posted on: 2011/6/7 18:18
|
|||
|
||||
|
Re: Need an example for radio button
|
||||
|---|---|---|---|---|
|
Home away from home
![]()
|
Here is what you wanted:
<pre>MODULE 'std/cGui' PROC main() DEF quit:BOOL DEF win:PTR TO cGuiWindow, item:PTR TO cGuiItem DEF guiRadio:PTR TO cGuiRadioChoice, guiOK:PTR TO cGuiButton DEF choices:ARRAY OF ARRAY OF CHAR CreateApp().build() ->equivalent to IsDesktopApp() ->create the GUI win := CreateGuiWindow('example') win.beginGroupVertical() guiRadio := win.addRadioChoice('Age', ['Young', 'Old', NILA]:ARRAY_OF_CHAR) guiOK := win.addButton('OK') win.endGroup() win.build() ->handle GUI events quit := FALSE REPEAT item := WaitForChangedGuiItem() SELECT item CASE NIL ->(a non-item event occured) so check if user tried to close the window IF win.getCloseRequest() THEN quit := TRUE CASE guiOK Print('You chose radio item number \d\n', guiRadio.getState()) choices := guiRadio.infoChoices() Print('You chose radio item string "\s"\n', choices[guiRadio.getState()]) ENDSELECT UNTIL quit win.close() FINALLY PrintException() ENDPROC</pre>
Posted on: 2011/6/5 19:11
|
|||
|
||||
|
Need an example for radio button
|
||||
|---|---|---|---|---|
|
Just can't stay away
![]() |
I need radio button and totally not understand how to do it. Can I ask for example with 2 radio buttons and 1 normal button OK and how read state this radio buttons (which was selected...) after pressing OK???
Posted on: 2011/6/5 17:10
|
|||
|
||||
You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.






