--- Don Allingham <[EMAIL PROTECTED]> wrote:

> Hello, and happy holidays to everybody.
>         
> I am observing strange packing behavior of the Expander
> widget. Consider the following piece of code:
> ===========
> import gtk
> 
> d = gtk.Dialog('Dialog')
> d.connect('delete-event',lambda obj,event: gtk.main_quit())
> 
> e = gtk.Expander('Expander')
> e.add(gtk.Label('Label\nAnother line\nand another line'))
> 
> d.vbox.add(e)
> d.show_all()
> 
> e.set_expanded(True)
> e.set_expanded(False)
> 
> gtk.main()
> ===========
> 
> When expander is expanded and then collapsed programmatically,
> the whole window is collapsed. But if I click to expand the
> expander and then click to collapse it, the window stays
> expanded.
> 
> Do I have to do some more packing magic (how?) or
> is this bug in pygtk?
> 
> Thanks in advance,
> 
> Don Allingham and Alex Roitman 
>         
> -- 
> Don Allingham
> http://gramps-project.org
> > _______________________________________________
> pygtk mailing list   [email protected]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
> 

Adding d.set_resizable(False) will cause the window to
shrink when the expander is collapsed.

-bc



        
                
__________________________________ 
Yahoo! for Good - Make a difference this year. 
http://brand.yahoo.com/cybergivingweek2005/
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to