Can the StyledTextCtrl control highlight the cursor position?

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
User avatar
Lsx
In need of some credit
In need of some credit
Posts: 2
Joined: Sun May 28, 2023 12:35 am

Can the StyledTextCtrl control highlight the cursor position?

Post by Lsx »

I'm designing a matching tool for regular expressions, and I want to highlight the matching text in the window after typing pattern.
But regular expressions have some zero-width matching rules, such as "\b" matching the boundary of words, and I can't use the "SetStyling" function to highlight these zero-width text.
Is there any way I can highlight multiple cursor positions, or is there an alternative solution?

Like this:
regex_match_word_boundary
regex_match_word_boundary
regex_match_word_boundary.png (7.25 KiB) Viewed 1114 times
Thank you for your help!
ollydbg23
Super wx Problem Solver
Super wx Problem Solver
Posts: 438
Joined: Fri Dec 12, 2008 10:31 am

Re: Can the StyledTextCtrl control highlight the cursor position?

Post by ollydbg23 »

1, you can ask question on scintilla's forum, that forum may give your more information.
2, I don't see multiple caret, but it looks like if you would like to multiple select text or edit on multiple places, you will have multiple caret shown on the control.

Good luck.
New Pagodi
Super wx Problem Solver
Super wx Problem Solver
Posts: 466
Joined: Tue Jun 20, 2006 6:47 pm
Contact:

Re: Can the StyledTextCtrl control highlight the cursor position?

Post by New Pagodi »

You might try using indicators.
Post Reply