'Dispatches an event to an element with given UID
:param uid: element UID
:type  uid: int
:param event: event name
:type  event: str
:param params: event arguments
:type  params: dict, None'

def dispatch_event(self, uid, event, params=None):

    if (not self.visible):
        return False
    if (self.uid == uid):
        self.event(event, params)
        return True
    else:
        for child in self.children:
            if child.dispatch_event(uid, event, params):
                for k in dir(self):
                    v = getattr(self, k)
                    if hasattr(v, '_event_id'):
                        element = self.find(v._event_id)
                        if (element and (element.uid == uid) and (v._event_name == event)):
                            getattr(self, k)(**(params or {}))
                return True
