Tony Flury
June 13th, 2009, 06:55 PM
I would like to be able to use glade to create a custom widget (using Glade 3.4).
I can write a python class for the new widget, which will do everything I need - it will Sub-class widget, trap a number of signals from the child elements, and generate its own signals a neccessary, and also define some new methods to allow the application to use the widget as a single entity.
What i don't know how to do is the following :
1) How do I use glade to create the GUI component of my widget
2) How do I add my custom widget to the glad palette, so I can include it in my application
3) when I open the glade file in my application, do I need to inform the gtk.glade library where the module is that defines the behaviour of my custom widget, and if not, how does GTK know how this widget will behave ?
I do have an alternative method to create & use my custom widget, by I would prefer to use Glade if i can.
I can write a python class for the new widget, which will do everything I need - it will Sub-class widget, trap a number of signals from the child elements, and generate its own signals a neccessary, and also define some new methods to allow the application to use the widget as a single entity.
What i don't know how to do is the following :
1) How do I use glade to create the GUI component of my widget
2) How do I add my custom widget to the glad palette, so I can include it in my application
3) when I open the glade file in my application, do I need to inform the gtk.glade library where the module is that defines the behaviour of my custom widget, and if not, how does GTK know how this widget will behave ?
I do have an alternative method to create & use my custom widget, by I would prefer to use Glade if i can.