| View previous topic :: View next topic |
| Author |
Message |
gbzstro Newbie
Joined: 15 Dec 2002 Posts: 3
|
Posted: Mon Dec 16, 2002 3:45 pm Post subject: Help please with radio buttons |
|
|
Hello - I am a newbie to VDS and I am looking for some help twith the radio buttons
all I want to do is set a varible %M when ever a radio button is selected - but I can not get it to work
Thanking you all in adavnce
Title Radio
DIALOG CREATE,New Dialog,-1,0,240,160,
DIALOG ADD,RADIO,Type,39,120,80,72,Caption,Advisory|Watch|Warning,,CLICK
DIALOG SHOW
:Evloop
wait event
goto @event()
:TypeCLICK
rem read what radio Button was clicked and set %M with avisory,Watch or Warning
%M = What value was clicked ???
info %M
goto Evloop
:Close
exit |
|
| Back to top |
|
 |
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1753 Location: Space and Time
|
Posted: Mon Dec 16, 2002 3:48 pm Post subject: Re: Help please with radio buttons |
|
|
All you need to do is use the @dlgtext() function. Like this:
| Code: |
Title Radio
DIALOG CREATE,New Dialog,-1,0,240,160,
DIALOG ADD,RADIO,Type,39,120,80,72,Caption,Advisory|Watch|Warning,,CLICK
DIALOG SHOW
:Evloop
wait event
goto @event()
:TypeCLICK
rem read what radio Button was clicked and set %M with avisory,Watch or Warning
%M = @dlgtext(Type)
info %M
goto Evloop
|
| gbzstro wrote: | Hello - I am a newbie to VDS and I am looking for some help twith the radio buttons
all I want to do is set a varible %M when ever a radio button is selected - but I can not get it to work
Thanking you all in adavnce
Title Radio
DIALOG CREATE,New Dialog,-1,0,240,160,
DIALOG ADD,RADIO,Type,39,120,80,72,Caption,Advisory|Watch|Warning,,CLICK
DIALOG SHOW
:Evloop
wait event
goto @event()
:TypeCLICK
rem read what radio Button was clicked and set %M with avisory,Watch or Warning
%M = What value was clicked ???
info %M
goto Evloop
:Close
exit |
_________________ Chris
Http://theblindhouse.com |
|
| Back to top |
|
 |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Mon Dec 16, 2002 3:50 pm Post subject: |
|
|
The @DLGTEXT() function will return the radio element selection.
| Code: | Title Radio
DIALOG CREATE,New Dialog,-1,0,240,160,
DIALOG ADD,RADIO,Type,39,120,80,72,Caption,Advisory|Watch|Warning,,,CLICK
DIALOG SHOW
:Evloop
wait event
goto @event()
:TypeCLICK
rem read what radio Button was clicked and set %M with avisory,Watch or Warning
%M = @DLGTEXT(Type)
info %M
goto Evloop
:Close
exit |
|
|
| Back to top |
|
 |
Hortalonus Valued Contributor


Joined: 15 Mar 2002 Posts: 344 Location: Western USA
|
Posted: Mon Dec 16, 2002 3:53 pm Post subject: |
|
|
Oooops! Looks like you beat me to it Chris!  |
|
| Back to top |
|
 |
gbzstro Newbie
Joined: 15 Dec 2002 Posts: 3
|
Posted: Mon Dec 16, 2002 3:58 pm Post subject: |
|
|
| Thank you both for the quick responce this has worked a treat |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|