TextEditor Selected text font.

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

TextEditor Selected text font.

Post by Quincunxian »

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
BruceSteers
Posts: 1505
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: TextEditor Selected text font.

Post by BruceSteers »

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.
If at first you don't succeed , try doing something differently.
BruceS
Post Reply