I'm trying to create a wx.KeyEvent object, I need it to emulate key press in wx.TextCtrl. I don't want to propagate the event (if possible), just create an object. Is there a way to do this?
I've looked at wx.KeyEvent page on the wxpython.org, yet I didn't find any useful information. My only hint is that maybe I could create a wx.Event object and give it the parameters I want?
EDIT: I've tried instantiating an Event object with eventType=wx.EVT_KEY_DOWN, but I get the exception saying that it cannot be subclassed/instantiated. No wonder, cause how would I even pass parameters into it.
wx.RichTextCtrl, If I remember it correctly thenSetInsertionPointcouldn't help me, as I am also styling the text depending on the content. for example numbers are of different color than keywords or parantheses. I found that onlyEmulateKeyPressworked for me. Other forms would only work partially.