a. When I load an rtf file into a TextArea, I have a result.
b. When I copy the contents of that file from the TextEdit application and paste it into my app TextArea, I get a different result.
Since I want the b result, I changed my code and simulate the Paste, and I failed
Nota: Item_TIS is a TextInputStream I get earlier.
Also, I replaced thsis line (below) with the two Used Code far below:
TA_Description.StyledText.RTFData = Item_TIS.ReadAll
TA_Description
is a TextArea
in my window.
Used code:
#1:
[code] Dim Clip As New Clipboard
Clip.AddRawData(Item_TIS.ReadAll, "public.rtf")
TA_Description.Text = Clip.RawData("public.rtf")
Clip.Close[/code]
Here I get the Clipboard as binary data
#2:
[code] Dim Clip As New Clipboard
Clip.AddRawData(Item_TIS.ReadAll, "public.rtf")
TA_Description.StyledText.RTFData = Clip.RawData("public.rtf")
Clip.Close[/code]
Here I get my text, but just like in a; just like if I loaded it from the file, not like if I pasted it from the Clipboard.
In simple words, I want to load the rtf code from the file (done), set it as RTF n the Clipboard (done) and Paste that in the TextArea (not the same result as my simple, manual Paste.
PS: If, after Pasting manually (cmd-v) my styled text (read a far above), I cut (or copy) it from the app TextArea and Paste it back to Apples TextEdit application, I get my correct text !
And no, I do not smoke strange things