Setting optimum gtkhtml2 widget size.

S

Sam

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

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
them.

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.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.7 (GNU/Linux)

iD8DBQBDP/HYx9p3GYHlUOIRAh0/AJ0SgdREJa2/i+EhYcppwW7E1FCliQCfa1+7
j9pxMsFg4UF+owokaeXF7P0=
=TAPv
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,264
Messages
2,571,323
Members
48,007
Latest member
Elvis60357

Latest Threads

Top