scrolled window vadj not being set



My application allows the user to split the display as many times as she wants. Each time she does so, I add an hpane or vpane as child2 to the existing hpane or vpane, then add a scrolled window. (I might not do it in precisely that order, but I'm hoping that won't matter.)

For various reasons, I need to know the size of the display in pixels, which is where the problem arises. I use gtk_window_set_default_size() to control the initial display (size_request would prevent the user from shrinking the window) and gtk_scrolled_window_get_vadjustment() to get the vertical height.

On initial display, the height in the adjustment is correct, but when I split the display, the exact same piece of code returns an adjustment containing mostly zeroes. Specifically, Upper is set, but step and page increments and page size are all zero.

How can I reliably obtain the display height and width in pixels?

My GTK is 2.0 and I'm running Red Hat 9.

Thanks
Rob Clack



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