Здравствуйте.
У меня в редакторе несколько вложенных друг в друга RichEdit. И когда я сохраняю с помощью SaveRvf , содержимое всех richedit-ов, кроме того, к которому я применяю сохранение, стирается, хотя SaveControlsBody стоит в true.
Приведу скрин строения программы:
Hello
I'm the editor several nested RichEdit. And when I keep using SaveRvf, the contents of all richedit-s, in addition to which I apply the retention, blurred, although SaveControlsBody stands true.
Just like a normal TRichView.
If you want to get all the content, use SaveRVFToStream. If you need it item by item, items are numbered from 0 to rv.ItemCount-1, a type of item is returned by rv.GetItemStyle, then use methods specific for each type.
В качестве RVF вприницпе подходит. Вообще, мне нужно в качестве RichViewEdit, чтобы я имел доступ к ItemCount, GetItemStyle и прочее. Мой парсер перевода в bbCode работает именно с RichView.
As RVF vprinitspe fit. Actually, I need as RichViewEdit, so I had access to ItemCount, GetItemStyle and so on. My translation of the parser to BBcode work with RichViewEdit.
If you have ItemNo (and the editor is in the main document, not in a table cell) use RichViewEdit.GetControlInfo(ItemNo, ...).
Then typecast Actrl to TRichViewEdit.
Теперь возникает проблема в RVStyle. Если изменить в созданом SubRichEdit'e изменить стиль(например, сделать буквы жирными), то при загрузке этого RVF появляется ошибка: "Error in reading RVF subdocument".
Возможно, что это из-за того, что в классе SubRichViewEdit создаётся отдельный RVStyle, а не наследуются от главного RichView.
Now there is a problem in RVStyle. If the change in the creation of SubRichEdit'e change the style (for example, do the letters in bold), then load the RVF error: "Error in reading RVF subdocument".
It is possible that this is due to the fact that the class is a separate SubRichViewEdit RVStyle, and are not inherited from the main RichView.
Yes, TSubRichViewEdit creates and uses its own TRVStyle, that is not connected with TRVStyle of the main document.
Not sure about the reason of this error, though. If you can create a simple projects and send it to me, I'll see what's wrong.