Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 1 Jahr, 10 Monaten
Letzter Beitrag:
vor 1 Jahr, 10 Monaten
Beteiligte Autoren:
Markus K., Arie, Fabrice Harari

[WD] ControlFindHighlight - buggy? How to select and mark text in an edit control?

Startbeitrag von Markus K. am 07.09.2016 06:32


is anyone using ControlFindHighlight?

I have an edit control (multiline) with text and another edit control to enter a word which should be searched and marked in the first edit control.
The text in the first edit control is too long for the edit control and so you have to use the scrollbars to see all the text.
As soon as i use ControlFindHighlight the edit control gets corrupted, using the scrollbars duplicates the text or it only shows the beginning of the text no matter how far i scroll down.

Is this a bug? Is there a workaround to select and mark text in an edit control?



Hi again,

is nobody using ControlFindHighlight?

Here are two screenshots showing what happens:

The edit control is usable without problems as long i dont use the function ControlFindHighlight:

When i use the function to highlight the word "USB" then the edit control gets corrupted:

Is there another way to search a text for some words and highlight them all?

von Markus K. - am 09.09.2016 08:56
Hi Markus

last time I needed to do that, this function did not exist, so we did it using the regular text functions (occurrence, position, etc) to find the words, and the dxxxx (dStylo and such) to change the color.

In fact, we used that system to create a code editor with syntaxical coloration in windev 5.5.

Best regards

von Fabrice Harari - am 09.09.2016 11:48

maybe you can build a small highlighter yourself.
I once got this project form the pcsoft repository http://depot.pcsoft.fr/resource.awp?file_id=56;easy-sql-remake
It includes a syntax highlight class to highlight SQL statement such as select, from, union, etc. while typing. It also has a intellisense which popups a list to choose from matching words when typing.
Maybe you can use that as an example. It works with RTFedit controls!

von Arie - am 09.09.2016 13:25
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.