TextFormatting Codes = BackPen
TextFormatting Codes = BackPen
Perhaps its because MUI doesn't support it however without asking I don't know (!), so Andreas perhaps you can tell me - can it be possible to be able to set a BackPen within FloatText?
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.
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.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
http://myevolve.wordpress.com
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: TextFormatting Codes = BackPen
No, it's not possible because MUI doesn't support this. Complain to the MUI developers
Re: TextFormatting Codes = BackPen
Ok will do!
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
http://myevolve.wordpress.com
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: TextFormatting Codes = BackPen
Good news for you! According to Thore Böckelmann of OS4 MUI fame it is indeed already supported but just not documented. You need to use \33B to enable background colour mode and then use \33p[RRGGBB] to set the background colour. To turn off background colour mode, you have to use \33F.
Here is an example:
This will print MUI in red letters on black background.
HTH!
Here is an example:
Code: Select all
<text>Hello! \33B\33p[000000]\33P[ff0000]MUI\33F\33P[000000] is magic</text>
HTH!
Re: TextFormatting Codes = BackPen
Excellent news thx guys
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
http://myevolve.wordpress.com
Re: TextFormatting Codes = BackPen
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?
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
http://myevolve.wordpress.com
Re: TextFormatting Codes = BackPen
Okay so I've moved on to looking at the TextEditor class instead as possible way to get a White background with formatted text in Back/Foreground colours that I choose.
Fail...
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.
Fail...
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.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
http://myevolve.wordpress.com
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: TextFormatting Codes = BackPen
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.
Re: TextFormatting Codes = BackPen
Hi Andreas,
Are you able to do a some extensive tests your end mixing BackPens and Regular pens with text blocks and push them into a floattext object? I am getting unbreakable program freezes which I have been unable to pinpoint as a problem in my code - potential floattext.mcc issue but Thore may require more detail.
PS: BackgroundRGB not accepted on a floattext.
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
PS: BackgroundRGB not accepted on a floattext.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
http://myevolve.wordpress.com
Re: TextFormatting Codes = BackPen
Hello,
Your editor is look like very good
Your editor is look like very good