Using CodeBench layout/colours as an example (see below) I want to be able to present the Line Number as a distinct visual vertical band of colour e.g. Light Blue with the Line Numbers in White Text.
![Image](http://i.imgur.com/gYiwF94.png)
![Image](http://i.imgur.com/WEwNXH5.png)
Code: Select all
<text>Hello! \33B\33p[000000]\33P[ff0000]MUI\33F\33P[000000] is magic</text>
What about Area.BackgroundRGB?djrikki wrote:Thanks, desired effect achieved, however it would be neat if I could work out how to change the background of the textblock from 'Amiga Grey' to White? Any ideas?
TextEditor.mcc is a different kind of beast. It doesn't use MUI's text engine at all so things will always be different with TextEditor.mcc. Better stick with Floattext.Okay clearly text formatting codes aren't accepted here, fine, I'll look at what Attributes the Class has. Ah, so I can use .Color to change the colour of the font, but seemingly no Attribute for BackColor with this particular Class.
Code: Select all
Function base:AddCodeLineNumber(plain,text$)
base:DebugPrint("base:AddCodeLineNumber() " .. IIf(plain = True, "OFF", "ON") )
Local textfile, count = SplitStr(text$, "\n")
text$ = ""
If plain = False
For Local l = 0 to count-1 Do text$ = text$ .. "\27B\27p[99B6D9]\27P[FFFFFF]" .. PadNum(l+1,4) .. "\t\27P[000000]\27F " .. textfile[l] .. IIf(l <> count-1,"\n","")
Else
For Local l = 0 to count-1 Do text$ = text$ .. PadNum(l+1,4) .. "\t " .. textfile[l] .. "\n"
EndIf
Return(text$)
EndFunction