Hello, i have been searching around to look for a solution, there is no example of how to insert picture at a custom position in TRichview. TRichviewEdit have an insertpicture method but TRichview doesnt. Using AddPictureEX it only asks for ParaNo and not ItemNo.
Can anyone tell me how can i get around this issue?
Regards
Insert image at after selected item no in TRichView
-
- Posts: 1
- Joined: Fri Jan 06, 2017 8:48 pm
-
- Site Admin
- Posts: 17571
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
TRichView does not include methods for insertion in the specified position (the only exceptions are InsertRVFFromStream and SetListMarkerInfo).
All its methods are designed for document generation, so they add new content to the end of the document.
However, RVInsertItem.pas contains some procedures for insertion, including RVInsertGraphic:
It inserts a new image in the position ItemNo.
Example:
All its methods are designed for document generation, so they add new content to the end of the document.
However, RVInsertItem.pas contains some procedures for insertion, including RVInsertGraphic:
Code: Select all
procedure RVInsertGraphic(RVData: TCustomRVData; ItemNo: Integer;
Graphic: TGraphic; Hyperlink: Boolean; ParaNo: Integer;
VAlign: TRVVAlign = rvvaBaseline; const Tag: TRVTag = RVEMPTYTAG);
Example:
Code: Select all
RVInsertGraphic(RichView1.RVData, 0, MyBitmap, False, 0);