[Gambas-user] Need help with TextEditor

Bruce Steers bsteers4 at gmail.com
Wed Sep 15 12:46:36 CEST 2021


On Wed, 15 Sept 2021 at 11:31, Bruce Steers <bsteers4 at gmail.com> wrote:

> You need to study the gb.eval.highlight component.
> http://gambaswiki.org/wiki/comp/gb.eval.highlight
>
> You can see how it's used in gambas syntax highlighting by studying the
> TextEditorMode_Style classes in the gb.form.editor component
> https://gitlab.com/gambas/gambas/-/tree/master/comp/src/gb.form.editor/.src
>


Oops sorry not the Mode files the highlight files found here in
gb.eval.highlight....
https://gitlab.com/gambas/gambas/-/tree/master/comp/src/gb.eval.highlight/.src


The code you are looking for as you run through the line characters is
something like this...


  If sChar = "{" Or If sChar = "}" Then
TextHighlighter.Add(Highlight.Operator, 1)


Like i say though i didn't start from the ground up with what I did so i'm
not sure how to properly initiate the highlighting routine

BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210915/69be1889/attachment.htm>


More information about the User mailing list