Hello
Are there any plans to include the event OnCheckpointVisible within the TRichViewEdit component?
Thanks
Ian
OnCheckpointVisible in TRichViewEdit?
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Actually, it's not very difficult. It was not implemented only because in TRichView checkpoint may appear only as a result of scrolling or resizing (and resizing usually causes scrolling), but in TRichViewEdit it may also appear as a result of editing. So the code used in TRichView will not always work in editor. This TRichView code is more optimal than I suggested in my reply (cycle from FirstItemVisible with GetItemCheckpoint), but more complicated.
Adding this single cycle in event is very simple, but it may slow down editing, especially if you want to implement CPEventKind=cpeAsSectionStart, and document is large and have a small count of checkpoints.
Adding this single cycle in event is very simple, but it may slow down editing, especially if you want to implement CPEventKind=cpeAsSectionStart, and document is large and have a small count of checkpoints.