Hello.
I know thgis is simple question, but can you help?
I have event handler for menu item but i need to call it manually from code too, how can i achieve it?
Thanks in advance.
Best regards,
Ruslan
Hello.
I know thgis is simple question, but can you help?
I have event handler for menu item but i need to call it manually from code too, how can i achieve it?
Thanks in advance.
Best regards,
Ruslan
Ruslan Spivak wrote:
I have event handler for menu item but i need to call it manually from code too, how can i achieve it?
There's two ways you can do this. One is to fake up an event object when you want to call the handler manually. The second (and probably preferable) is to design a second function that can be called from the event handler *or* anywhere else you care to.
def OnMyMenuEvent(self, evt):
self.DoEventHandling()
If there's any attributes of the event that you need, you can pass them to the internal function as parameters.
Jeff Shannon
Technician/Programmer
Credit International
def myhandler(self, event = None):
...
Regards,
On Mon, 2003-08-18 at 02:13, Ruslan Spivak wrote:
Hello.
I know thgis is simple question, but can you help?
I have event handler for menu item but i need to call it manually from
code too, how can i achieve it?
--
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 (800) 735-0555