Re: GtkTable again




Michal Vitecek <fuf@fuf.sh.cvut.cz> writes:

> Hello all,
> 
>   I'm still fighting with GtkTable and I've come across another problem
> (for me *sigh*). I have put here a part of the source (changed, so it
> looks a bit uselessly now, but the main idea is the same). 
>   The problem is that even that I attach a widget that is to span over 2
> or more columns to the table and the rest of widgets are taking only one
> column, the wider widget gets shrinked and is made to take up the same
> column number as the rest of widgets. 
>   I really don't know what to do to make it work.

The problem is that your table isn't homogeneous, so the Table
widget notices that your column spanned entry already has
enough space from column 2 and doesn't need any in column 3.
And thus column 3 gets 0 width.

Possible solutions:

 1) Make the table homogeneous

 2) Use two tables, the outer one not homogeneous, the inner
    one homogeneous
 
 3) Put a spacer widget into one of the empty cells in column 3.
    (For instance:

        GtkWidget *spacer;
	spacer = gtk_alignment_new (0,0,0,0);
	gtk_widget_set_usize (spacer, 100, -1);

     will give you a widget that draws nothing, has a minimum width
     of 100, and no minimum height)

Hope this helps,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]