This is part of my code:

imagesize = (128, 128)
window =gtk.Window()
window.resize(imagesize[0],imagesize[1])

scrolled =gtk.ScrolledWindow()
scrolled.set_policy(gtk.POLICY_AUTOMATIC,gtk.POLICY_AUTOMATIC)
scrolled.set_shadow_type(gtk.SHADOW_NONE)

area =gtk.DrawingArea()|
area.set_size_request(imagesize[0],imagesize[1])|

window.add(scrolled)
scrolled.add_with_viewport(area)
area.show()
scrolled.show()|
window.show()

|It creates a Window with a ScrolledWindow inside, with a Viewport inside, with a DrawingArea inside. I would expect the resulting window to be just big enough to hold a 128x128 image, but it isn't, and it has scrollbars.
It works if I write the second line like this:

window.resize(imagesize[0] + 2,image.size[1] + 2)

But it's ugly, and it doesn't always work. On Windows I had to use + 3.

Any help is greatly appreciated.
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to