[Glade-users] Glade and Python




I haven't got an answer to my last question, but I have to move on. Here is another question.
I created GUI with Glade-2, converted .glade file to Python via Gladex. I am new to Python/Gladex, so my 
question is how in Python I would access widgets that I created in Glade? Say I created a dialog box in Glade 
with a button and an empty label. When I click on a button, I want to set label text (inside Python code, as 
opposed to pre-setting it in Glade). I know in C, I would call create_myDialog() to get the pointer to the 
dialog box created in Glade, then I would call lookup_widget(myDialog, "myLabel") to get the pointer to the 
label and then I would call gtk_label_set_text(label, "here goes the label text") to set the label text.
What are the Python functions to do this? I could find Python examples on creating/setting widgets from 
scratch, but I couldn't find examples on how to set properties of widgets that were created via Glade? If you 
have good tutorial example, it would helpfull too.
Thanks much.
Arthur.                                           
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20100910/6ffd0a52/attachment.html 




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