[pygtk] Adding scrollbars to a window.

Jakob Schiøtz schiotz at fysik.dtu.dk
Tue Mar 1 05:21:17 WST 2011


Hi,

I am working on a scientific code, where some dialog windows are rather complex.  I would like to add scrollbars to some of the more complex dialogs, so users with low resolution screens don't get windows higher than their screen.

I tried doing this by making the topmost widget in a gtk.Window a gtk.ScrolledWindow, and put everything in a gtk.VBox inside that one.  Unfortunately, the result is a rather small window with scrollbars.  I would prefer a window that is as large as necessary to show all the contents, unless that would make it larger than the screen, in which case the scrollbars should appear.  I assume that this must be a common task, with a known solution.  Can somebody point me in the right direction?

Best regards

Jakob


--
Jakob Schiøtz, Ph.D.
Associate professor (lektor)
Study leader, M.Sc. in Physics and Nanotechnology
(kandidatstudieleder, Fysik og Nanoteknologi)
CINF, Department of Physics
Technical University of Denmark
DK-2800 Kongens Lyngby, Denmark
http://www.cinf.dtu.dk/~schiotz/



More information about the pygtk mailing list