Hi,
I have an RTF TextArea named textpagina, and I am able to load an RTF file with various text attributes: (such as color, normal, bold, italic, and underlined) using the following code:
Dim tis as TextInputStream
Dim d As OpenDialog
d = New OpenDialog
d.Filter = (DemoFiletypes.FTC_RTF )
fi= d.ShowModal
If fi <> Nil Then
tis= TextInputStream.Open(fi)
textpagina.StyledText.RTFData = tis.ReadAll
tis.Close
If I try to change the font size or name
(for example:
textpagina.FontSize = 10
textpagina.FontName = “Arial”)
the text retains only the color and loses all other attributes.
How can I fix this?
There is a way to add features in Xojo with Declare (seach in the xojo site for DeclareSub (I think it is its name).
I used it long time ago. With time I lost the idea to use the TextArea RTF styles.