Recent

Author Topic: FastHighliter - for Hunspell wrapper - or to highlight strings  (Read 1126 times)

Raf20076

  • Full Member
  • ***
  • Posts: 173
    • https://github.com/Raf20076
Hi Guys
I have just converted and tweaked FastHighliter Delphi project to Lazarus project, so now you can use it in Lazarus IDE.

It could be used for misspelt words in combination with Hunspell wrapper (you can find my project in https://wiki.freepascal.org/spelling#Demo_3_-_Spellchecker_-_non_characters.2C_carriage_return.2C_split_string)

The FastHighliter project is from http://delphiforfun.org/programs/delphi_Techniques/FastHighlighting.htm (it's not mine) and could be modiefied and used for non-commercial purpose. It's very fast because it uses WindowProc procedure used by TRichMemo and let it paint the window which we then scan for words to by highlighted and rewrite them in the specified color.

Before you use it you must install RichMemo component.

Go to https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/
Download folder lazarus-ccr-svn-r...click button -> Download Snapshot
Uncompress folder  lazarus-ccr-svn-r
RichMemo component is in folder - components
Install richmemopackage

I hope that it could be useful




Raf20076

  • Full Member
  • ***
  • Posts: 173
    • https://github.com/Raf20076
Re: FastHighliter - for Hunspell wrapper - or to highlight strings
« Reply #1 on: July 12, 2020, 11:33:16 am »
Hi Guys

I have found it that it works only in ASCI. If you want to use UTF8 it doesn't work (for example text in Polish, with polish letters) or the position is not calculated properly.

It could be good to have highlighter which highlight all specific words in Richmemo.



« Last Edit: July 12, 2020, 11:36:04 am by Raf20076 »

 

TinyPortal © 2005-2018