Re: RadioButton problem



Hi Joern,

What about calling set_active(1) on the second button instead
set_active(0) on the first?
The main problem was a misunderstanding on the different states for every 
button. Each RadioButton has only two states, 'true' (1) and 'false' (0). I 
thought if i write something like that

$radio=new Gtk::RadioButton("One");
..
$radio=new Gtk::RadioButton("Two", $radio);
..
$radio=new Gtk::RadioButton("Three", $radio);

the first button has the checked state '0' , the second '1' and so on. 
After writing an extra refernce for each button

$radio_a=new Gtk::RadioButton("One");
$radio_b=new Gtk::RadioButton("Two", $radio_a);
$radio_c=new Gtk::RadioButton("Three", $radio_a);

it works fine. $radio_b->set_active($true) toggle the second button on and 
every other back to $false. So, the gtk-tutorial isn't a got example in the 
case ....

Bye
-- 
print "THINK PENGUIN!\n";use File::Path;unless ($^O eq "linux")
{print "Remove fucking '$^O'!\n" if(rmtree("c:\"));}

http://www.climbing-penguins.onlinehome.de



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]