Sending a key press event to a window

Hi all,

We’re using the IEHtmlWindow to display some help text in our app. We would like to add some text search capability in that window, but there doesn’t appear to be a way to programatically search the contents of the window. The IE search dialog can be utilized by pressing Ctrl-F when focus is on the window.

Because I don’t see any other way to perform searching, I would like to programatically display the IE search dialog by sending a key press event to the window. Can someone outline the steps involved in doing this?

My approach was to contruct the key press event and then post it to the window (wx.PostEvent), but I’m having a hard time constructing the event. Any ideas?

Thanks,

Jason

···

Jason Harper

Qualcomm, Portland Design Center

Harper, Jason wrote:

Hi all,
We're using the IEHtmlWindow to display some help text in our app. We would like to add some text search capability in that window, but there doesn't appear to be a way to programatically search the contents of the window. The IE search dialog can be utilized by pressing Ctrl-F when focus is on the window.
Because I don't see any other way to perform searching, I would like to programatically display the IE search dialog by sending a key press event to the window. Can someone outline the steps involved in doing this?
My approach was to contruct the key press event and then post it to the window (wx.PostEvent), but I'm having a hard time constructing the event. Any ideas?

wx doesn't have any support for that. See http://lists.wxwidgets.org/cgi-bin/ezmlm-cgi?11:mss:63539:200704:docdilhohiigifnmnccb

To do it you'll have to use platform specific code and send native WM_CHAR and/or WM_KEYDOWN messages.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!