Re: widget packing question



On Tue, Aug 27, 2002 at 12:54:29PM -0400, drl22 cornell edu wrote:
Hi,
I am writing an applciation with a main window layout that looks 
something like this:

+------------------------+---------+
|                        | Buttons |
|    +--------------+    |  over   |
|    | Drawing      |    |  here   |
|    | area         |    |         |
|    +--------------+    |         |
|                        |         |
+------------------------+         |
| Status bar             |         |
+------------------------+---------+

What I've done is to put an hbox in the window, with an expand=fill=true vbox
on the left and an expand=fill=false vbox on the right.  Then when I pack the
drawing area into the left vbox, I set expand=true, fill=false, but it
still fills in the horizontal direction... 

I want the drawing area to expand but NOT to fill in both directions. 
Basically I want it to be centered on the enclosing container, without
automatically resizing. 

What's the best way to do this?  I also was wondering how I can know when 
the available space for the drawing area changes, without automatically 
resizing it.  Could I do this by connecting the "size_allocate" signal to 
the left vbox?

  Imho, the easiest way to achieve this is to include the drawing area
  into an alignment (GtkAlignment).

    HTH,

        DindinX

-- 
David dindinx org



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