Keeping VPane ratios



I have a window with an vertical pane and two widgets in each pane.  I set the
usize on one widget to make it look the way I want.  When the window is resized
the size of each pane changes messing up the placement of the widgets in the
panes.  Right now I'm attaching a resize callback to the "expose_event" on the
window and resizing the one widget according to a given ratio.  This halfway
works, but it seems the expose_event gets signalled even if the window isn't
resized (i.e. you switch to another desktop and switch back, you click on the
window).

Normally this wouldn't be so bad because the signal handler should get the old
values of the window... but this is not the case.  The event seems to be
returning very small window sizes disallowing proper sizing of the widget I
want to keep in proportion with the other in the VPane.

Is there another event that I can hook into? ("move_resize" and "resize_move"
both do not work) or is there another solution to this problem?

Thanks in advance.

Eden Li
tile@primenet.com



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