Hello Doru,This feature does not exist on Text. TextAttributes I am aware of includes: underlined, italic, bold, narrow, struck out, indents, text color, fonts (fonts work poorly in some circumstances) and alignment properties. Additional things such as links and URL are there but I have never achieved to make them work.However, highlighting is available directly in PluggableTextMorph.If you inspect a NautilusWindow (open Nautilus, use Morph halo to inspect it), you can have in the iv model the packageTreeNautilusUI, then in the iv sourceCodeArea a PluggableTextMorphWithLimits. Then in the inspector you can do:highlights add:��((TextHighlight on: self)color: Color lightBlue;lineRange: (10 to: 30))After moving once the window, you'll notice this result:So to have highlighting for your text I guess you'll have to dig in that direction ... This is directly implemented on the Morph and not on the Text so it may be a bit difficult to use.Regards.Cl��ment2014-09-01 9:41 GMT+02:00 Tudor Girba <tudor@tudorgirba.com>:
Sorry. I was not explicit enough.We now have a way to set the TextColor of a text. I am looking for a way to do something like this:aText addAttribute: TextBackgroundColor yellowIs there something like this implemented for Text?Cheers,DoruOn Sat, Aug 30, 2014 at 5:00 PM, stepharo <stepharo@free.fr> wrote:
hi doru
do you mean like when we select the code?
Stef
On 28/8/14 07:00, Tudor Girba wrote:
Hi,
Does any of you know if there is a way to add a background color to a piece of text?
Cheers,
--"Every thing has its own flow"