Selection in Table
Table can be:
▪not selected or
▪selected completely (as a part of larger selection) or
▪selected partially (multicell selection) or
▪some part of cell content (in cell or in inplace editor) selected.
RichView does not support selection started somewhere else and finished at the middle of a table. Selection containing several items can contain tables only completely (or it does not contain them).
Any method working with selection must be called only when the document is formatted.
Table can be selected partially: selection can starts on one cell of table, and ends on another cell.
You can determine if the given cell is selected or not with the method IsCellSelected.
See also: TRichViewEdit TopLevelEditor.
Before making selection inside cells, you need to activate inplace editor for it (TRichView does not have inplace editors, but the same code must be called in TRichView too, not only in TRichViewEdit).
Example 1 (selecting table.Cells[0,0]):
Example 2 (does the same)
uses CRVData, CRVFData;
var RVData: TCustomRVData;
RVData := table.Cells[0,0];
RVData := RVData.Edit;
The method in the second example (calling RVData := RVData.Edit, then selecting) can be used for any type of RVData, not only for table cells.
Some RichViewEdit methods can be applied to the selected cells (regardless the type of selection):