Setting optimum gtkhtml2 widget size.

Sam sam at
Sun Oct 2 16:42:30 CEST 2005

I'm putting gtkhtml2.View() inside a gtk.ScrolledWindow, which goes into a 

How do I obtain gtkhtml2.View's preferred height, and set the dialog's 
height accordingly, given a specific width?

I can do a gtk.Dialog.set_default_size() up front, specifying the width and 
height large enough for everything, then create all the widgets, and realize 

But then, even after I realize everything I can't get any useful metrics 
from gtkhtml2.View().  None of the usual suspects -- get_size_request, 
get_allocation -- give anything useful.

I also tried not using a ScrolledWindow, but adding gtkhtml2 as 
gtk.Dialog.vbox's child.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <>

More information about the Python-list mailing list