Need help in emulate of key press (wxTextCtrl)

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
zof
In need of some credit
In need of some credit
Posts: 8
Joined: Sun Mar 27, 2005 3:47 pm
Location: Russian
Contact:

Need help in emulate of key press (wxTextCtrl)

Post by zof » Sun Mar 27, 2005 4:59 pm

>wxTextCtrl::EmulateKeyPress
>bool EmulateKeyPress(const wxKeyEvent& event)
>This functions inserts into the control the character which would have been inserted if the given key event had occured in the text control. The event object should be the same as the one passed to EVT_KEY_DOWN handler previously by wxWindows.
>Return value TRUE if the event resulted in a change to the control, FALSE otherwise.

self.form.e_potr_kd - wxTextCtrl

Need send keycode WXK_RETURN in self.form.e_potr_kd

---------------
self.emulatekey=wxKeyEvent(wxEVT_CHAR_HOOK) # Constructor. Currently, the only valid event types are wxEVT_CHAR and wxEVT_CHAR_HOOK.

#How to send code WXK_RETURN in self.emulatekey ?

if self.form.e_potr_kd.EmulateKeyPress(self.emulatekey)==1 : print "ok!"
---------------

Post Reply