To allow you to see the annoyance, I create a brand new project.
I put a TextArea, a PushButton.
Code in PushButton1.Action:
[code] Dim Clip As New Clipboard
If Clip.TextAvailable Then
TA.Text = “”
TA.Text = Clip.Text
Clip.Close
End If[/code]
At run time, place a Red / Bold text (two words are enough) in the TextArea (using Copy / Paste).
Place the cursor inside the red text, place a 10 or so lines of styled (or unstyled) text in the Clipboard and press in the PushButton.
Now all of your Text is in Bold / Red.
How can I get rid of that ?
Nota: this happens in a software when I read raw text and place it into a TextArea. The text is auto-saved to disk (fortunately as REW TEXT).
Question: is this a bug to report ?
BTW: after a little sleep, I awoke with a solution. Every time I change the TextArea whole contents, I have first to clear it, then set the color, text font name & size, etc. to reset the TextArea to a default state to avoid this annoyance.
Note: this phenomen can be seen wherever the cursor is in the TextArea (not only at position 2 ), provided it is in a style that is not the default style.