TextWriter.WriteLine writes text to the underlying stream, like a external textfile. you can pass the line anyway to a message box where you can set the color to the desired color. but directly setting the color is not possible, I think...
see https://www.b4x.com/android/help/files.html#textwriter
TextWriter.WriteLine writes text to the underlying stream, like a external textfile. you can pass the line anyway to a message box where you can set the color to the desired color. but directly setting the color is not possible, I think...
see https://www.b4x.com/android/help/files.html#textwriter
I think that there is some confusion. TextWriter has nothing to do with the text appearance. It converts string characters to bytes and writes them to a stream.
I think that there is some confusion. TextWriter has nothing to do with the text appearance. It converts string characters to bytes and writes them to a stream.
Thanks Erel but is there a way to control text appearance in the way that I have described? I have written a shopping list app for my own use actually. It works quite well (I think) but would benefit from being able to change text color when writing the list so that I can distinguish items in different parts of the store.
Having fun anyway. Tony
When I look at the richstring (rs) it's formatted as I want it in colour. But when I write the string to my text file it becomes plain unformatted text.
Is it because WriteLine can't handle the formatted text?
So, when you save the file and load it back you need to use build the richstring with your text again to display it formatted i think (dont have used richstring)
You cannot store a formatted richstring to a textfile.