Re: RadioButton problem
- From: Henning Paschke <paschke online de>
- To: Joern Reder <joern netcologne de>
- Cc: gtk-perl-list gnome org
- Subject: Re: RadioButton problem
- Date: Wed, 5 Dec 2001 17:04:42 +0100
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]