[Gtk-sharp-list] Re: Some questions about layout management in Gtk# 2.0

Eric Butler eric at extremeboredom.net
Sat May 14 14:16:32 EDT 2005

Hash: SHA1

Michael Thomsen wrote:
> 1) How do you put two elements such as a label and a combobox in a 2
> element VBox and have them set to be variable sizes? Let's say I want
> the label to take up 20% of the space and the comobox to take up 80%
> of the space. Is this even possible with Gtk#'s layout management?

I do not believe Gtk supports percentage widths, but I think you will
find that it's generally not something you need. You can place your
label and widget in either a GtkTable or GtkHBox to have it size them

If you do not believe this will work for you, please reply with a more
specific explination of what you wish to achieve.

> 2) When I try to reference a ComboBox object marked with a [Widget]
> attribute from a Glade file, my test program crashes. Could someone
> explain why this happens? Below is the code in question:

I am assuming you are getting a type cast exception. If I am wrong, you
should post the error!!! In glade, select the widget and look in the
Properties window under "Class". You are probably using a
GtkComboBoxEntry (Gtk.ComboBoxEntry) instead of a GtkComboBox, or
something to that effect.

Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org


More information about the Gtk-sharp-list mailing list