[pygtk] Sizing textviews in a vbox question
James Simmons
jim.simmons at walgreens.com
Sat Apr 4 05:00:25 WST 2009
I'm working on a program for reading Project Gutenberg etexts and I want
to add an annotation feature. To do this I have created a Vbox and have
added two gtk.ScrolledWindows to the VBox. Each ScrolledWindow contains
a gtk.TextView. Now what I want to happen is the top text view contains
a read-only single page of a Gutenberg etext. The bottom text view
should be editable, so the reader can make notes on the page visible in
the upper window. I want to be able to hide and show the bottom text
view and scroller so the user only sees it when he wants to annotate a page.
Everything I have described above works. The problem is, when the
bottom textview and scroller are visible they is exactly the same size
as the top textview and scroller. What I want is for the bottom
textview and scrolller to take less than half the vertical space in the
window. No more than 30% of the window height and perhaps less. The
annotation area is less important than the reading area above so the
vertical size should reflect that.
So how do I go about making the bottom textview shorter than the top one?
Thanks,
James Simmons
More information about the pygtk
mailing list