[pygtk] how to call a method of GtkWidget by using object of GtkWindow

varun_shrivastava shrivastavavarun at yahoo.co.in
Mon Aug 20 22:17:33 WST 2007


actually i have inherited my widgets as shown

GtkVBox --> GtkMyDisplayable ---> GtkMyForm

GtkMyDisplayable has an api gtk_my_displayable_add_command(GtkMyDisplayable
*displayable, gchar *string)
so i do following 
>>> form = mygtk.MyForm()
>>>form.displayable_add_command("_____")
it displays following error
"form has no attribute displayable_add_command"

As you said gtk_window_show is used internally than its for sure that typing
window.show() in python will call api of GtkWidget. But in my case its not
happening


Gian Mario Tagliaretti-3 wrote:
> 
> 2007/8/20, varun_shrivastava <shrivastavavarun at yahoo.co.in>:
> 
>> but in python i can't do this because GtkWindow has its own method
>> gtk_window_show(), so whenever i do window.show()
>> gtk_window_show() will be called instead of gtk_widget_show.
> 
> AFAIK there is no public method gtk_window_show(), it's a function
> used internally, so you cannot use it in C either.
> 
> cheers
> -- 
> Gian Mario Tagliaretti
> _______________________________________________
> 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/
> 
> 

-- 
View this message in context: http://www.nabble.com/how-to-call-a-method-of-GtkWidget-by-using-object-of-GtkWindow-tf4298164.html#a12236796
Sent from the Gtk+ - Python mailing list archive at Nabble.com.



More information about the pygtk mailing list