Re: GTK Table resizing...

On 12 Apr 2001 20:20:27 -0400, Havoc Pennington wrote:

Matt Gerginski <mattgerg users sourceforge net> writes:
Hi.  In my program, I am using a GTK Table.  One of the childrem widgets
is a GTK Label.  Here is my problem;  When the label is changed, if it
is too big to fit in the table cell, it will resize the table in order
to fit.  I've tried (without any luck) many combinations of GTK_FILL,
GTK_EXPAND, and GTK_SHRINK.  Is there another way to stop a table from
resizing, or some pattern of the GtkAttachOptions that I havent tried
yet??  Idealy, I would like the label to just be chopped off as soon as
it exceeds the size of the table cell.  Any help would be appreciated.

The attach flags only affect size allocation, not size request.

If you call gtk_widget_set_usize() on the label, you can keep it from
requesting more size than the usize. That might work.


This could work.  However, I'd like to not use widget_set_usize() only
because if someone had a different font size, it would not be right.  Is
there some way I could get the size of the cell before I put the label
into it, and then use gtk_widget_set_usize() with that number??  That
would be good if I could do that somehow.  Thanks.


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