problem resizing windows



Hi folks,
I've been watching the list for a while to see if my problem came up,
but as it hasn't, here goes:

I'm trying to rewrite a program that I originally wrote in raw Xlib,
but using gtk+. Part of it consists of a window which contains a
drawing_area with scrollbars (H & V). The idea is to simulate a potentially
huge drawing area by just maintaining the visible bit.

I want the drawing area to be as resizeable by the user (within reasonable
limits). So far it's fine until you come to resize it. After a lot of 
hassle I eventually connected a configure_event to the main window. 
In this I calculate how big the drawing area can be and call 
gtk_drawing_area_set_size.  I also resize the scrollbars using 
gtk_widget_set_usize. Some of the time this works fine, but 
occasionally it seems to develop a loop and the window keeps 
resizing between two sizes. Clicking on the WM bar at the top, 
or on another window seems to stop the cycle, but I'm just a
bit confused as to what I'm doing wrong.

Can anyone offer any advice?

Thanks in advance,

Bill

-- 
+-----------------------------------------------+
| Bill Purvis, Musical Engineer                 |
| 35 Chapel Road, Penketh, Warrington, Cheshire |
| WA5 2NG. phone: 01 925 725731                 |
| e-mail: bill.p@bigfoot.com                    |
+-----------------------------------------------+





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