ur_widget.hide()
ur_widget.set_no_show_all(True) # show_all() will not show it

On 9/21/05, Andrew Conkling <[EMAIL PROTECTED]> wrote:
> I have an expander in my window and I have the window resize when the
> expander is activated; in other words, it shrinks when the expander is
> contracted and expands when expanded.  (See the code below.)  Up until
> now, it's worked great, but I recently allowed one of the widgets in
> the expander's child to be hideable.  Now, I notice that using
> expander.child.show_all() and hide_all() overrides that widget's
> hidden state (makes sense), but if I change to expander.child.show()
> and hide(), there is an extra blank portion left over when the
> expander is contracted.
>
> The short of it is: is there any reason I shouldn't leave my code
> as-is and just add an if block to handle the visibility of that
> specific widget?
>
> Thanks in advance!
> Andrew
>
> def expander_activate(self, expander):
>        if expander.get_expanded() is True:
>                expander.child.hide_all()
>                (self.window.we, self.window.he) = self.w('window').get_size()
>        else:
>                expander.child.show_all()
>                (self.window.w, self.window.h) = self.w('window').get_size()
>        return
> def after_expander_activate(self, expander):
>        if expander.get_expanded() is False:
>                window_size = self.w('window').get_size()
>                self.w('window').resize(window_size[0], 1)
>                if self.window.w and self.window.h != 0:
>                        self.w('window').resize(self.window.w, 1)
>                #self.w('window').set_geometry_hints(None, max_height=72)
>        elif expander.get_expanded() is True:
>                window_size = self.w('window').get_size()
>                self.w('window').resize(self.w('window').get_size()[0],
> window_size[1])
>                if self.window.we and self.window.he != 0:
>                        if self.window.we < self.window.w:
>                                self.window.we = self.window.w
>                        self.w('window').resize(self.window.we, self.window.he)
>                #self.w('window').set_geometry_hints(None)
>        return
>
> --
> http://aconkling.blogspot.com
> _______________________________________________
> pygtk mailing list   [email protected]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
>


--
Nikos Kouremenos | Jabber ID: [EMAIL PROTECTED] | http://members.hellug.gr/nkour
_______________________________________________
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