[gtkada] VBox with V_Separator too wide

Rick Duley rickduley at gmail.com
Tue Jun 2 11:33:32 CEST 2009


Hi folks

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

      -- Create Buttons_HBox which will eventually have 3 cells.
      Gtk.Box.Gtk_New_HBox (Box         => The_Gadget.Buttons_HBox,
                            Homogeneous => false,
                            Spacing     => 0);

      -- Create V_Sep_HBox.
      Gtk.Box.Gtk_New_HBox (Box         => The_Gadget.V_Sep_HBox,
                            Homogeneous => TRUE,
                            Spacing     => 0);

      -- Create V_Sep.
      Gtk.Separator.Gtk_New_Vseparator (Separator => The_Gadget.V_Sep);

      -- Install V_Sep in V_Sep_HBox.
      Gtk.Box.Pack_Start (In_Box  => The_Gadget.V_Sep_HBox,
                          Child   => The_Gadget.V_Sep,
                          Expand  => True,
                          Fill    => True,
                          Padding => 0);

      -- Install V_Sep_HBox in Buttons_HBox.
      Gtk.Box.Pack_Start (In_Box  => The_Gadget.Buttons_HBox,
                          Child   => The_Gadget.V_Sep_HBox,
                          Expand  => True,
                          Fill    => True,
                          Padding => 3);
To the left of the separator is a big button, to the right a stack of three
buttons.  It should look like this:

+-----------------------------------------+
| +--------------+ +---+ +--------------+ |
| |              | | | | |              | |
| |              | | | | +--------------+ |
| |              | | | |                  |
 | |              | | | | +--------------+ |
 | |              | | | | |              | |
 | |              | | | | +--------------+ |
 | |              | |   | |              | |
 | +--------------+ +---+ +--------------+ |
+-----------------------------------------+

The problem is that the separator fills a space in the window almost as
large as the buttons.  I would expect the separator to appear only as a thin
line sandwiched tightly between the buttons.  It actually looks more like
this:

 +-----------------------------------------+
| +-----------+ +---------+ +-----------+ |
| |           | |    |    | |           | |
| |           | |    |    | +-----------+ |
| |           | |    |    |               |
 | |           | |    |    | +-----------+ |
 | |           | |    |    | |           | |
 | |           | |    |    | +-----------+ |
 | |           | |    |    | |           | |
 | +-----------+ +---------+ +-----------+ |
+-----------------------------------------+

How do I control the width of the separator (and/or the HBoxes).

Thanks



-- 
Rick Duley
North Perth,
Western Australia
http://www.freewebs.com/rickduley/
                                    .-_|\
                                   /     \
                             perth *_.-._/
                                        v
aussie :      04...
o'seas :   +61 ...
--------------------------------------------
Committees:
"... dark alley down which ideas are led
                   ... then strangled."
                                  (PepsiCo)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/gtkada/attachments/20090602/cd12dd9e/attachment.htm 


More information about the gtkada mailing list