Tony,

On Sat, 2005-12-24 at 15:27 -0500, Tony Nelson wrote:
> I would think this is because you did this before the widgets received
> their allocations, which happens at event processing time (I think you can
> see this by connecting to the "size_allocate" gtk.Widget signal).  You
> might want to set the expanded state in response to some signal or other
> (maybe "size_allocate"), or you might see what happens if you have an event
> eater before you do this.  (I'm a bit uncomfortable with event eaters in
> general, and especially before calling gtk.main(), so it's at your own
> risk.)
> 
> def gtkeat():
>     while gtk.events_pending():
>         gtk.main_iteration(False)

Why would I want to do any of that, unless there's a bug in pygtk?

It seems that, if I click and then click again, I should get back
to the same state as I was, and I never do. I thought initially
that some packing options are incorrect, but no amount of tweaking
packing in Dialog, its Vbox, or expander itself can seem to make
a difference.

I am not looking into making programmatic expansing/collapsing
to behave same as the UI way. Rather, I want to get the expander
to behave correctly on clicks. When the user collapses it, the
dialog window should shrink, since the whole point is to hide
the extra contents. I see no use for keeping an area of the
screen taken by "grey matter" of a dialog with no contents.

Am I missing something here?
Alex

-- 
Alexander Roitman   http://www.gramps-project.org

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to