05-02-2024, 08:45 AM
ZS,
You can set the font properties for default and before word/line colouring.
For finer control you are going to have to do it directly in C#.
You can set the font properties for default and before word/line colouring.
For finer control you are going to have to do it directly in C#.
Code:
rtb =LDControls.AddRichTextBox(300,300)
'Default font
font = LDDialogs.Font("")
LDControls.RichTextBoxFontFamily = font[1]
LDControls.RichTextBoxFontSize = font[2]
LDControls.RichTextBoxFontBold = font[3]
LDControls.RichTextBoxFontItalic = font[4]
LDControls.RichTextBoxFontForeground = LDDialogs.Colour()
LDControls.RichTextBoxDefault(rtb)
LDControls.RichTextBoxSetText(rtb,"This is my rtb"+LDText.LF+"with some text in it!","False")
'Set selected word color
LDControls.RichTextBoxFontForeground = "Red"
LDControls.RichTextBoxWord(rtb,"text",0)