I am trying to work out the best way of implementing "Bookmarks" in RichViewEdit. This seems to be a good starting point:
rve.InsertBullet(45, ButtonImageListEnabled);
rve.SetCurrentTag(IntToStr($1000));
I am creating an image in the text from my image list and assigning a tag value to this item. In theory, I can then use the tag value at a later time to determine if this item is a bookmark. So far so good.
Now whatever I create in RichViewEdit, I need to be able to save and load back from some file format. I am not too fussy about which format that is.
Saving as RTF seems to save the file and reload it. however it does not save the Tag value. Also after reloading it, when I click on my Bookmark icon, I get some strange little squares appearing around the icon.
Saving as RVF creates a file with a load of extra stuff in it, but when you load it back the Bookmark icons are missing as are any carriage returns.
Any clues as to how I can add Bookmarks? Maybe there is a completely different way as to how this should be done?
TRichViewEdit - Bookmarks
-
- Site Admin
- Posts: 17571
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Use "checkpoints". They are automatically saved as anchors to HTML and as bookmarks in RTF. The only limitation: unlike RTF bookmarks, checkpoints do not have a length, they mark a position in the document.
See http://www.trichview.com/help/checkpoints_overview.html
See http://www.trichview.com/help/checkpoints_overview.html