TTMSFNCTreeView and SaveToFile question

Hello.
I have problem with reading data for TTMSFNCTreeView from text file.
The file is created previously by SaveToFile method.

When all columns have tcetEdit EditorType - all works correctly.
But when I use last column editor as tcetMemo - then (if in cell is more than 1 line) problem arises: while loading data from file, lines of this multiline cell (from 2nd line) they become new Nodes.

Maybe I omit something simple (ex. in properties), but my attempts to solve it have not yielded any results.

When I manually edited saved file and introduce HTML tags - all works properly, but I don't know how to obtain such a record using SaveToFile method.

I will be grateful for any help.

Greetings for the whole community,
Pawel

Unfortunately, there is currently no option in the SaveToFile method to simply save text with multi-line content in a single node. Alternatively, you could switch to more advanced JSON based file saving with

TMSFNCTreeView1.Nodes.SaveToJSONFile();
TMSFNCTreeView1.Nodes.LoadFromJSONFile();

Hello Pieter,

Thank you very much for help. It is a simple and elegant solution.
Fortunately, I have no problem using the json format. There is only a difference in file size, but it is acceptable in my case.

So, thank you once again!

Regards,
Pawel

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.