View Full Version : Radiobutton in DialogEX
markstaylor
05-31-2009, 06:16 PM
I have a simple issue.
I have a dialogex with radiobuttons.
if cnt == "FTP" then
RadioButton.SetProperties("RadioButton19", tbProperties);
RadioButton.SetChecked("RadioButton19", true);
end
I have tried both of these commands and the buttons DONOT check.
I have verified the cnt = "FTP" and it displays in a message box.
I'm obviously doing something wrong. There isn't any issues with radiobuttons in a dialogEX is there?
MicroByte
06-01-2009, 03:39 AM
yes, there is a issue with radio objects and DialogEx, but there is also a workaround
look here: http://www.indigorose.com/forums/showthread.php?t=25355&highlight=bug+radio+dialogex
azmanar
06-01-2009, 06:33 AM
Hi,
I make sure GroupID is empty when I work with 4 RadioButtons or more on DialogEx.
Otherwise, one of the Radio Button would refuse to get unchecked once its checked. So I would strangely have 2 checked Radio Buttons then. Maybe its a bug or maybe its me.
To overcome the issue I don't use GroupID. And I make a script to get checked radio and value. I don't know whether its as efficient as others. But it does what I need.
--- get which radiobutton is checked. I have 4 Radio Buttons.
for i=1,4 do
bCheck = RadioButton.GetChecked("RadioButton"..i);
if bCheck ==true then
tRBprops = RadioButton.GetProperties("RadioButton"..i);
sRBvalue = tRBprops.Value;
end
end
--- do things according to RB value
if sRBvalue =="1" then
-- do something
elseif sRBvalue =="2" then
-- do something
elseif sRBvalue =="3" then
-- do something
elseif sRBvalue =="4" then
-- do something
end
markstaylor
06-21-2009, 06:17 PM
I made the ID blank and it works on all but 1. I will work on something. Thanks for the suggestions.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.