Hi all,
In my application I use a wxHtmlWindow to display report data. Now I'd like to add 'Find/Find next' functionality (using wxFindReplaceDialog). But how shall I visually indicate the occurances of the search string in the html window? The only idea I have is to rebuild the file and include color tags around the occurances. But now, how to scroll the window to the next occurance automatically?
Thanks for any input, I don't believe I'm the first one to try this
Regards,
Gregor
Implementing Find/Find next in wxHtmlWindow
-
- Knows some wx things
- Posts: 31
- Joined: Mon Nov 07, 2011 12:41 pm
Re: Implementing Find/Find next in wxHtmlWindow
If you're using wxWIdgets 3.0. the easiest way is probably to switch to wxWebView instead of wxHtmlWindow.
With wxHtmlWindow, i could only think of this way: When generating the html code, you include unique anchors into the code, e.g one for each line. Then you could use the protected method ScrollToAnchor() to scroll to that anchor.
With wxHtmlWindow, i could only think of this way: When generating the html code, you include unique anchors into the code, e.g one for each line. Then you could use the protected method ScrollToAnchor() to scroll to that anchor.
Use the source, Luke!
-
- Knows some wx things
- Posts: 31
- Joined: Mon Nov 07, 2011 12:41 pm
Re: Implementing Find/Find next in wxHtmlWindow
Thank you for your reply. Not yet using version 3. But probably that's the way to go.