Re: [pygtk] Finding out a widget's parent



The following has worked for me:

I have a reference to a window called selectionWin, which is a
GtkFileSelection.  I wanted to hide the file component, since I only
want the user to select directories.  However, a scroll bar was left
behind that I didn't have a name for, so I did this:

selectionWin.__getattr__('file_list')['parent'].hide()

--- Christian Robottom Reis <kiko async com br> wrote:

How does one find out the widget's parent (i.e., it's immediately
enclosing container). I've thought about writing a wrapper for
gtk_widget->parent, but noticed there doesn't seem to be a way of
finding
out _what type of widget it is_ -- or is there?

Is there another way of picking up it's parent? Using get_ancestor,
perhaps?

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 272 3330 | NMFL

_______________________________________________
pygtk mailing list   pygtk daa com au
http://www.daa.com.au/mailman/listinfo/pygtk


=====
1024D/6CE00097 2001-02-24 David Everly <deckrider yahoo com>
Key fingerprint = E587 30C6 167F 9F25 6869  90B9 18F2 E454 6CE0 0097

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]