I have troubles with a Styled TextArea and tabs

Thanks, Norman. My comment above was meant to be in keeping with what you’ve stated. That is, things that Xojo explicitly supports, there are properties and methods for; things Xojo doesn’t support, there aren’t. My suggestion was only that access be made easier to generic RTF control codes - that’s all that Xojo would be guaranteeing. What use one made of that power would be on that person (think Spiderman here).

Correct. It was never intended to. Although it would make a good feature request. RTF support was added as a mechanism to save Styled Text from the TextArea, which only supports bold, italic, underline, font, size and color. Support for anything else is a byproduct of the underlying technologies and is a bonus, but not intended or supported.

This is not my opinion.

The first releases with rtf support was a shame; diacritical characters were… and I do not talk about…

Nota:
A Paste of styled text in TextArea display things that may not be saved at RTF saving time.
You have to be aware of that.
As an example, Copy an html table (in Safari or FireFox) and paste it into an application with TextArea: you will see a nice table that will disappears once saved to disk.

I spent too much time checking all of these. I even checked what Xojo put in the Clipboard when you copy styled data from the Xojo running application:
Copy styled text from Apple’s TextEdit,
Paste it into the Xojo running application’ TextArea,
copy a single word from the TextArea, (a way to clear the previous Clipboard contents)
Select All and copy all from the TextArea.
Then, with a dedicated AppleScript, I saved the Clipboard’s «Class RTF » to disk file and inspect it as rtf code.
The result is surprising.

I also take some minutes to display raw text file into a Canvas. Have a look below:

The line that have a number followed by a ‘large space’ (30 pixels) is in fact a line with tab between each number.
You can see that I can print in a canvas as many as 35 tabs (nearly 3 times what I can do with a TextArea) - the file holds 41 tabs).
You can also see that I have troubles to align lines where the text between tabs is larger than 30 pixels. If I can get exercicetime, I will try something to get a better look. But this is only a style exercise project.
Also: no H/V scroll bars, etc.
But, less than 20 lines / less the time spent to write this discussion to get that result.

Norman:

Hence why I’ve said I would not rely on RTF for what Emile is relying on it to do.
That is OK for me, I can use anything else (built-in Xojo), but what and how. Advice(s) needed.

Today image’s text comes from a “book” of 803 comic strips magazine run (Indrajal Comics) released in India. The text as you can read is a description of one issue contents. At first, I only used one tab (between the page number and the description); after a while, I added more tabs to get a better look / understanding.
Then I used two or three consecutive tabs to (try to) get a better look.

I even tried to create rtf files (read/write) instead of raw txt files, but I falled in some troubles, but I forgot what they were.

Mattew:
Of course, if I can hope some sales, paying to build a far better application is a good deal.

But this will not be the case, unfortunately.

That’s correct. As far as I can tell, the methods for saving/loading RTF data only work for the explicitly supported RTF attributes.

I was playing around and came up with:

[code] // To save all our RTF data, copy to Clipboard, then save Clipboard data as String
// Naturally, this is limited by how much data our Clipboard can hold - not the ideal solution

me.SelectAll
me.Copy

Dim st As String, c As New Clipboard

st = c.RawData(“public.rtf”) // get unstructured string
c.Close

Dim f as FolderItem=GetSaveFolderItem(TextTypes.TextRtf,“TestSaveRTF”)
If f <> nil then
Dim tos as TextOutputStream=TextOutputStream.Create(f)
tos.Write st
tos = nil
End if
[/code]
For Mac-only, this has information from Massimo Valle about how to use native methods for loading and saving. These seem to be the same as what’s provided with macoslib.

Thanks Tim, that very concisely and precisely defines the situation.

Write code to do whatever alignments etc you want in a Canvas (unless you need this to also be editable ?)
A listbox with lots of columns so you can insert the data to align to whatever point you want.

I need to have the data editable unless I have to do the edit in one software (say Word in OS X / Windows) and display them in another (mine) ?

The Canvas screen shot above only shows what I do not know:
how to deal with some lines with tabs ?
how to add (and make working) h & v scrollbars in a Canvas ?
etc.

I went to a development software to not have to deal with all of these, it was what I was believing.

That is what I was thinking of: Xojo is not capable of doing what I want and I am not capable to work-around these shortcomings.

It tooks me some months to discover that, back before the first release of REALbasic… so many years ago.

Conclusion: I will give up this absurd idea and will leave this bad display in the software.

No: no feature request because they have so many things to do that this functionality will come after I would be in position to eat dandelions by the root.