Hmm.  Well, if you didn't care about resizing the window/table, then I
would suggest you use GTK_FILL for the xoptions.  If you use
GTK_EXPAND as an xoption for, say, the hscale, then the two columns
containing the hscale will expand uniformly.

Okay, that was me making sure I understand the question... :)

My cheap hack: add a new row, and

GtkWidget *magic;
magic = gtk_drawing_area_new();
gtk_drawing_area_size(GTK_DRAWING_AREA(magic), 0, 0);
gtk_table_attach(GTK_TABLE(table), magic,
    1, 2, 2, 3,
    GTK_EXPAND|GTK_FILL,
    0, 0);

Now when I resize the window, it is quite noticeable that only the
middle column (the one with the expanding magic) changes size.

Moral of the story: use GTK_EXPAND sparingly.

-Alem

On 6/17/05, Karl H. Beckers <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm having this effect where my table cells aren't expanding as I expect
> them to. If somebody could shed some light here (perhaps provide a
> workaround) that would be most welcome.
>
> I have reduced this to the max. Let's say we have this table with 3
> columns and 2 rows where in each row there is a widget spanning two
> columns, like this:
>
>  .....................................................................
>
>  | +------------------+ | +--------------------+-------------------+ |
>
>  | | checkbutton      | | | entry              |                   | |
>
>  | +------------------+ | +--------------------+-------------------+ |
>
>  | +--------------------+--------------------+ | +-----------------+ |
>
>  | | hscale             |                    | | | checkbutton     | |
>
>  | +--------------------+--------------------+ | +-----------------+ |
>
>  '`'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
>
> I've set both checkbuttons to not horizontally expand the surrounding
> container and the entry and hscale to do so. This (so I expected) should
> make the middle column take care of any extra space needed without the
> outer columns ever changing width.
>
> However, this is not at all what's happening. It looks like the space
> added to e.g. the hscale is divided evenly between the spanned columns
> (rather than implementing a more complex algo for finding out if a given
> widget is perhaps the only expaning widget on a spanned column while
> other spanned columns may have other expanding widgets, or smth. the
> like), and thus also added to the first one.
>
> Any ideas, pointers?
>
> TIA,
>
> Karl.
>
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to