TextEditor Selected text font.

Post your Gambas programming questions here.
Post Reply
User avatar
Posts: 133
Joined: Sunday 25th June 2017 12:14am
Location: Western Australia

TextEditor Selected text font.

Post by Quincunxian » Monday 26th July 2021 1:50am

Is there a way to set the selected text to bold or italic ?
As far as I can see, you can only set the font to the whole document.
What I would like to do is select a single phrase in a sentence and set it to italic only.

From what I understand, the Gambas code editor is made from this component but if this is the case then
it seems a lot of the functionality is missing from the user control.
Cheers - Quin.
I code therefore I am

User avatar
Posts: 657
Joined: Thursday 23rd July 2020 5:20pm

Re: TextEditor Selected text font.

Post by BruceSteers » Monday 26th July 2021 6:53am

there is TextEditor.HighlightString(sText)

that will highlight any and all strings matching the search

but then selecting text highlights it anyway.

for texteditor it's a no.

RichText will do html <b>

texteditor has Highlighting with eval.highlight and TextHighlighting classes, kinda complicated but i figured it out for the shell highlighting i did.
Wishing well

If at first you don't succeed , try it differently.

Post Reply