How set initial size for gtk.ScrolledWindow?



I'm using pygtk.  I've got a gtk.ScrolledWindow that I'm using as the parent of a gnomecanvas subclass I've created.

I'd like to specify that the preferred *initial* size of that scrolled window is a particular width and height.  I *don't* want those suggested intial size values to in any way constrain the possible sizes the window can take on, and if possible I don't want to accidentally force the top-level window to be bigger than the display.

Can anyone recommend a way to do this?

Here's what I've already tried without success:

my_canvas.set_size_request(...) (which resolves to gtk.Widget.set_size_request) does a good job of setting the initial window size, but when I use it I'm unable to resize the top-level window in any way that would shrink my ScrolledWindow below the size I specified.

I've tried following the call to my_canvas.set_size_request(...)  with a subsequent call to:
    my_scrolledwindow.window.set_geometry_hints(min_width = 0, min_height = 0)
or
    my_canvas.window.set_geometry_hints(min_width = 0, min_height = 0)
But neither of those does the trick.

Any suggestions?

Thanks very much,
Christian


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