[Gtk-sharp-list] How to create a group for Gtk.RadioToolButton ?
Thu, 14 Apr 2005 13:50:14 +0200
Quoting Thomas Pryds Lauritsen <email@example.com>:
> 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.
According to this:
there are several, but none empty.
> | 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";
> RadioToolButton r1 = new RadioToolButton(r0);
> r0.Label = "label 1";
> However, the initialisation of r0 fails since there is no suh
> constructor for RadioToolButton.
You should probably just do this:
Toolbar t = new Tollbar();
RadioToolButton r0 = new RadioToolButton(null); //See previous link
r0.Label = "label 0";
RadioToolButton r1 = new RadioToolButton(r0);
r0.Label = "label 1";
Hope this helps,