Re: Table size too big !



On Thu, 22 Mar 2001, Mike Holme wrote:

> Hi,
> 
>    I have an application that uses a table to layout various widget. The
> Table is 28 by 20 and I intend it to be homogenous. However when I
> select homogenous the table causes the window to be 3 times the width of
> the screen. I understand that the size is based on the largest element
> in the table. In this case I have some buttons which are much wider than
> they have to be (I only need them to be as wide as the text on them) and
> I think the rest of the table is based on them. My question is this, how
> can I forced the buttons to be smaller in size (less wide - equal to the
> text they hold) and thus make the rest of the table smaller. 
>    Has anybody else had similiar problems. Hope this is clear enough.

are you by any chance setting usize on the buttons?
if that's not the case you probably have some other widget that occupies
more space than you'd think, either by setting usize on it or e.g. a label
that contains a string longer than you want.
buttons normally only request the space required to hold their
child plus a frame.
(if you pack them with the GTK_EXPAND|GTK_FILL flags they will be made as big
as the table cell you pack them into but won't cause the table to allocate
bigger cells.)


> 
> Mike
> 

---
ciaoTJ





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