Items' "Tags" in TRichView
Each item of TRichView has an associated string value – tag. Tags are provided for the convenience of storing additional string value for special needs in your application. The main purpose of tags is organizing a work with a hypertext.
Do not confuse RichView items tags with "Tag" properties of TComponent descendants! (TRichView uses "Tag" properties of inserted controls for its own needs; you can set "Tag" properties of ImageList for organizing saving/loading "bullets" and "hotspots" from RVF; but this topic is about completely different tags!)
▪if you do not want to use them – just forget about them; they always will be equal to '';
▪"checkpoints" also have tags; all rules for items tags work for checkpoints tags;
▪table cells also have tags; all rules for items tags work for checkpoints tags;
▪editor can clear (set to '') tags when applying different style to text according to RichViewEdit.EditorOptions;
•If you want to save and load document in RVF you must provide that tag strings do not contain #1 and #2 characters;
•You can use AddXXX methods which do not have Tag parameter. These functions create new items with Tag=''.
Unicode note: tags are Unicode strings.
var Tag: TRVTag;
// Converting the first text item and its tag string to upper case
MyRichView.GetTextInfo(0, S, Tag);
In TRichView versions prior to v13.2, tags were Integers. Depending on rvoTagsArePChars Option, they can be either plain integer values or pointers to strings.
This mode can be returned by defining RVOLDTAGS in RV_Defs.inc.
TRichView methods for adding items with tags to the end of document (a tag is an optional parameter):
TRichView methods for adding "checkpoints" with tags to the end of document (a tag is an optional parameter):
TRichView methods for obtaining information about items (including tags):
TRichView methods for modifying items (including tags):
TRichView methods allowing work with checkpoints tags:
TRichViewEdit methods for obtaining information about item in caret position:
TRichViewEdit methods for inserting:
TRichViewEdit methods for modifying items (including tags):
TRichViewEdit methods for modifying information about item in caret position:
TRichViewEdit methods for working with checkpoints tags:
TRichViewEdit options affecting tags: