New widgets and their widths
- From: Flavio Ribeiro <flavio hackpalace com>
- To: gtk-list gnome org
- Subject: New widgets and their widths
- Date: Mon, 29 Jan 2001 17:01:50 -0200
Hello,
I'm having trouble with creating widgets that don't expand to use all
available window space. I've had good results when using
gtk_widget_set_usize on them followed by adding to a GtkAlignment widget.
For example, here's a code snippet:
pConfigurationVSeparator = gtk_vseparator_new ();
gtk_widget_set_usize (pConfigurationVSeparator, 10, 352);
pConfigurationVSeparatorAlignment = gtk_alignment_new (0, 0, 0, 0);
gtk_container_add (GTK_CONTAINER (pConfigurationVSeparatorAlignment),
pConfigurationVSeparator);
gtk_table_attach_defaults (GTK_TABLE (pTable[0]),
pConfigurationVSeparatorAlignment, 1, 2, 0, 1);
gtk_widget_show (pConfigurationVSeparator);
gtk_widget_show (pConfigurationVSeparatorAlignment);
However, I have the following gripes with this:
1. The process looks inefficient. I have to create a GtkAlignment widget
for every other widget I want to restrain, use an extra
gtk_container_add and gtk_widget_show.
2. The size I declare in set_usize is final. The widget doesn't expand
proportionally if I increase the window's size.
What should I do to make gtk_widget_set_usize's values stick after the
call without resorting to GtkAlignment? And if I _must_ use
GtkAlignment, how can I allow the widget to resize if I resize its window?
Thanks,
Flavio
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]