A question about box packing and widget/window sizing..



I've got the following layout:

+-toplevel window----------------------+
| +-vbox-----------------------------+ |
| | +------------------------------+ | |
| | | menu                         | | |
| | +------------------------------+ | |
| | +-hbox-------------------------+ | |
| | | +---------+ +--------------+ | | |
| | | | packing | | drawing area | | | |
| | | |  table  | |              | | | |
| | | |         | |              | | | |
| | | +---------+ |              | | | |
| | |             |              | | | |
| | |             |              | | | |
| | |             +--------------+ | | |
| | +------------------------------+ | |
| +----------------------------------+ |
+--------------------------------------+
(isn't ascii art fun??)

I need all of the following to occur when the toplevel window gets resized
by the user:
1) The packing table should always remain at its smallest possible size
   given its contents (several fixed-sized pixmaps).
2) The drawing area should take up any/all remaining space while keeping
   a square aspect ratio.
3) The toplevel window should automatically shrink itself to tightly
   enclose the table and newly sized (square) drawing area.

I've got auto-shrink set to true on the toplevel window (via
gtk_window_set_policy()) and I've got the packing table set to
false/false WRT expand/fill.  The trouble is, I can't figure out
where/when/how to force the square resize on the drawing area to make
this all work.  I tried playing inside the drawing area's configure event
callback, but to no avail.  

Any help is appreciated, especially WRT expand/fill settings necessary for
the various widgets (including containers)..

Dan 
 ____    Kressin   ____   .-----------------------------------. 
/___ \____________/ __ \  | dkressin@acm.org                  |
    \  \    /      /  \ | | Lead Programmer/Analyst           |
 ___/ __\/\/rench_ \__/ | | University of Wisconsin - Oshkosh |
\____/            \____/  | www.mio.uwosh.edu/~kressd11/      |
                          `-----------------------------------'



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