[Gtk-sharp-list] Exclusive button group (vbuttonbox)?
Jesper K. Pedersen
linux at famped.dk
Wed Nov 25 17:20:07 EST 2009
On Wed, 25 Nov 2009 13:22:52 +0100
Martin Brodbeck <martin at brodbeck-online.de> wrote:
> Hello,
>
> first of all, I'm very new to Mono/MonoDevelop/GTK#, and this is
> certainly a typical newbie question.
>
> I would like to have a the following in my main window:
> - a notebook widget on the right
> - a kind of navigation bar on the left, which selects the displayed
> notebook page.
>
> For the navigation bar, I chose a VButtonBox. My problem is now that
> I would like to have exclusively checkable (toggle) buttons in the
> VButtonBox. I guess something similar is used in the Evolution mail
> client in order to switch between Mail, Contact, Kalendar, and so on.
> (I think Qt has a QButtonGroup and/or QGroupBox which does exactly
> what I want.)
>
> So far, I only managed to get a VButtonBox with "normal" buttons
> (with the MonoDevelop GUI designer) or - only manually - with toggle
> buttons ( [...] vbuttonbox.Add(new Gtk.ToggleButton("Test"));
> [...] ), but these buttons are not exclusive.
>
> Or am I on the wrong track? How can I come up to this kind of
> navigation bar?
>
Easy way to do it is just to use a vertical box and stack in radio
buttons.
If using the radio buttons and you want a regular button look
(without the bullit to show the current selected) just set the
DrawIndicator to false (the option in Glade called "Indicator" in case
you use glade GUI editor).
Good luck with your project.
JesperKP
More information about the Gtk-sharp-list
mailing list