[gtkada] VBox with V_Separator too wide

Dmitry A. Kazakov mailbox at dmitry-kazakov.de
Tue Jun 2 12:01:01 CEST 2009


On Tue, 2 Jun 2009 17:33:32 +0800, you wrote:

> I have a V_Separator in an HBox in the second cell of another HBox.  Code
> is:

If you don't want the separator to be expanded in the box, specify:

   Expand => False, Fill => False

in Pack_Start (Pack_End)

Do same for the box containing the separator.

However, you don't need an enclosing box. It would be better to place the
separator directly into the  box 'of three cells".

The rule of the thumb suitable for most of cases when designing boxes and
tables:

In a row there should be only one column that expands when the box or table
does horizontally. Same for vertical expansion: in a column: there should
be only one expanding row.

Never place an H box into another H boxes or a V boxes into another V box.
It makes no sense.

Another advice. When designing composite widgets, do not store pointers to
all internal things like separators, boxes, labels, frames, scroll bars in
the widget's record, if you don't use them later. Normally 50% of this
stuff is never needed after it is placed into an appropriate container. Use
local variables in the Initialize. Less aliasing you introduce, safer it
will be.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



More information about the gtkada mailing list