def OnPropGridChange(self, event):
        p = event.GetProperty()
        if DEBUG: print "change!", p
        if p:
            name = p.GetName()
            spec = p.GetPyClientData()
            if spec and 'enum' in spec.type:
                value = p.GetValueAsString()
            else:
                value = p.GetValue()
            #self.log.write(u'%s changed to "%s"\n' % (p,p.GetValueAsString()))
            # if it a property child (parent.child), extract its name
            if "." in name:
                name = name[name.rindex(".") + 1:]
            if spec and not name in self.groups:                
                if name == 'font':  # TODO: detect property type
                    # create a gui font from the wx.Font
                    font = Font()
                    font.set_wx_font(value)
                    value = font
                # expressions must be evaluated to store the python object
                if spec.type == "expr":
                    value = eval(value)
                # re-create the wx_object with the new property value
                # (this is required at least to apply new styles and init specs)
                if DEBUG: print "changed", self.obj.name
                kwargs = {str(name): value}
                wx.CallAfter(self.obj.rebuild,  **kwargs)
                if name == 'name':
                    wx.CallAfter(self.callback, **dict(name=self.obj.name))