TRichViewEdit - Bookmarks
Posted: Mon Feb 18, 2013 3:35 pm
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?
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?