[Gtk-sharp-list] How to create a group for Gtk.RadioToolButton ?

Fredrik Nilsson jymdman@home.se
Thu, 14 Apr 2005 17:01:30 +0200


Hi Thomas,

Create the first RadioToolButton with this:

RadioToolButton r0 = new RadioToolButton(new GLib.SList (typeof
(RadioToolButton)));

and I think it should work for you :)

/Fredrik


On tor, 2005-04-14 at 12:37 +0200, Thomas Pryds Lauritsen wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi Anset
> 
> Thank you for your reply. I think I might not be saying clearly enough
> what it is that I want, though. I am talking about RadioToolButtons for
> placing in a Gtk.Toolbar, not plain RadioButtons. (RadioToolButton does
> not inherit from RadioButton)
> 
> Anset wrote:
> | There is also a constructor that does not take a button. :)
> 
> According to monodoc, there is not such a constructor for
> RadioToolButton, though.
> 
> | Button0 = new RadioButton("Label0");;
> | Button1 = new RadioButton(group, "label1");
> | Button2 = new RadioButton(group, "label2");
> 
> This doesn't seem to work with RadioToolButton, though. I tried the
> following code:
> 
> Toolbar t = new Tollbar();
> RadioToolButton r0 = new RadioToolButton();
> r0.Label = "label 0";
> t.Add(r0);
> RadioToolButton r1 = new RadioToolButton(r0);
> r0.Label = "label 1";
> t.Add(r1);
> 
> However, the initialisation of r0 fails since there is no suh
> constructor for RadioToolButton.
> 
> Thanks.
> Thomas
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.6 (GNU/Linux)
> 
> iD8DBQFCXkfc29+7ChTwyPURAh86AKCFxPzpzYJgjS2B/pQ7ol4W4Sg2jwCg0Kyj
> MpOVhM2a6imaudc3UBXbEwc=
> =FoXS
> -----END PGP SIGNATURE-----
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>