[pygtk-0.7.0, python-1.6a2, gtk-1.2.7, Suse Linux 6.1, kernel 2.2.11]

I create a gtktext widget and insert a few lines of text, then show().
Why doesn't the widget shrink to fit the text it contains?  It always
seems to be 10 lines high.  I've tried various combinations of 
set_usize(-1,-1), set_usize(0,0), set_default_size, set_policy...

Here's a simple example:

from gtk import *
w=GtkWindow()
#w.set_policy(TRUE, TRUE, TRUE)
vb=GtkVBox(FALSE, 0)
#vb.set_usize(-1,-1)
w.add(vb)
for i in range(3):
    txt=GtkText()
    #txt.set_usize(-1,-1)
    txt.insert(None, None, None, 'This is a long string to test the text widget on 
multiple lines. This is a boring long string')
    txt.show()
    vb.pack_start(txt, FALSE, FALSE, 0)
w.show_all()
main()


Eventually, I'll want the text widget to shrink/grow dynamically as the user
types input...


Thanks,
        George


George Young,  Rm. L-204                [EMAIL PROTECTED]
MIT Lincoln Laboratory
244 Wood St.
Lexington, Massachusetts  02420-9108    (781) 981-2756

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to