Radio Button Issue
Author |
Message |
Justin_
|
Posted: Sun Jan 22, 2006 11:23 am Post subject: Radio Button Issue |
|
|
Hi, the problem I'm having is the radio buttons have no effect in my program unless I click one of them. It starts at a default location, and if the user doesn't change the default radio button then the radio button is ignored. How can i make my program sense the default radio button is selected? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Clayton
|
Posted: Wed Jan 25, 2006 3:03 pm Post subject: (No subject) |
|
|
i think possibly the only solution to your problem is to use the command
GUI.GetEventWidgetID. this command checks to see what button has been pressed. i dont know if this will work for radio buttons however, but here is the code for regular buttons
code: |
import GUI
proc buttonPress
if GUI.GetEventWidgetID button then
%do what needs to be done here
elsif GUI.GetEventWidgetID button2 then
%do whatever you might want to do with the second button
%etc...
end if
end buttonPress
var button:int:=GUI.CreateButton(0,0,0,"button",buttonPress)
var button2:int:=GUI.CreateButton(0,50,0,"button2",buttonPress)
loop
exit when GUI.ProcessEvent
end loop
|
so basically, the GUI.GetEventWidget eliminates the need for multiple procs but it might work in your case, again im not sure if it will or not but............... |
|
|
|
|
|
|
|