[Gambas-user] TextHighlighter["gambas"].CanRewrite = False

Benoît Minisini benoit.minisini at gambas-basic.org
Tue Dec 12 15:42:37 CET 2023


Le 12/12/2023 à 15:33, Bruce Steers a écrit :
> 
> I cannot seem to disable CanRewrite in a texteditor :(
> 
> I try this....
> 
> TextHighlighter["gambas"].CanRewrite = False
> $hEditor.Highlight = "gambas"
> 
> but the text gets re-written still?
> 
> The editor has a highlight selector to try different highlights on text 
> files that might have not been recognized.
> If gambas is selected I only want to enable CanRewrite if the file is 
> known to be gambas code.
> 
> I also only want to disable rewrite for gambas highlight in the loaded 
> editor not everywhere and TextHighlighter["gambas"].CanRewrite = False 
> seems kinda global not local to current editor.
> 
> I guess i am doing it wrong :(
> 
> any advice ?
> 
> Thanks in advance
> BruceS
> 

The CanRewrite property is not static, and the TextEditor always set it 
to TRUE before doing its highlight.

Regards,

-- 
Benoît Minisini.



More information about the User mailing list