[pygtk] Accessing child widgets via instance variables
Dominic Salemno
d.salemno at gmail.com
Fri Aug 29 23:56:28 WST 2008
Greetings,
If my_win is already an instance of GtkWindow then to show it you merely
do something along this line: my_win.show()
You should not have to do anything afterwards. If my_win does not
represent your window, what is this representing? If something else
entirely, choose a different variable name. Perhaps you could paste more
code for us to see?
Your variable, if it indeed defines a GtkWindow, should be declared as
follows:
self.my_win = gtk.Window(gtk.WINDOW_TOPLEVEL)
Even if my_win is instantiating a custom class which in turn is
inheriting from gtk.Window, you would still perform the following to
show the window: self.my_win.show()
If this is not working, please paste more code.
Sincerely, Dominic Salemno.
Pádraig Brady wrote:
> Drew Vogel wrote:
>
>> Thanks, I have this mostly working. However it looks like instead of calling
>>
>> my_win.show()
>>
>> I now have to call
>>
>> my_win.GtkWindow.show()
>>
>> Is this correct?
>>
>
> Yes. my_win.GtkWindow is just a shortcut I thought was useful.
> To access other widgets, just use my_win.id.
>
> Pádraig.
> _______________________________________________
> pygtk mailing list pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
>
More information about the pygtk
mailing list