[Glade-users] using post_create_function in python



I am looking for a python example for use of post_create_function.
I wish to override the image of the window or fixed container with an image.
I am creating a custom widget for a machine controller (linuxcnc)

XML file snippit:

    <glade-widget-class name="MAPPED" generic-name="mapped" title="Mapped">
    <post-create-function>do_post_create</post-create-function>
    </glade-widget-class>


python code snippit:

import gobject,gtk

class MAPPED(gtk.Window):
    __gtype_name__ = 'MAPPED'
    __gproperties__ = {
        'filename' : ( gobject.TYPE_STRING, 'File name for mapped image',
                'file name',
                "Filename", gobject.PARAM_READWRITE|gobject.PARAM_CONSTRUCT),
    }
    __gproperties = __gproperties__

    def do_post_create(self, obj, reason):
        print "post create"
 
I am using glade 3.6.7 (I must at present)
I could not find a current example on the net.
closest I could find:
http://www.pygtk.org/articles/custom-widgets-glade/Custom_PyGTK_Widgets_in_Glade3-part-2.html
Which is way out of date.
Thanks for any help.

Chris M
                                          
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/glade-users/attachments/20131130/d348782b/attachment.html>



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