I have a textarea in which my app writes logging messages. I’d like to be able to colour the odd message in a highlight colour. Playing around with styled text, I can write a line of red text but only the most recent message gets the highlight. My logging method is:
Sub logger (strtext as String, colour as Color) Var len As Integer // logst is a StyledText property of the window len = logst.Text.Length logst.Text = logst.Text + strtext + EndOfLine logst.TextColor (len, strtext.Length) = colour TextArea1.StyledText = logst end sub
It looks like modifying the text content of the StyledText removes all existing style information. Is there a real way to do this?