Set Image Size When Using Action List's Insert Picture
Posted: Fri Oct 03, 2008 10:13 am
Hi,
I have a large JPG image at this location:
http://www.ctsoftware.com.my/refimages/large.jpg
When I use the rvaActions's Insert Picture menu to insert the image into a RichViewEdit, I would like to set the image size to about 100 x 100 and also allow the user to resize it.
Sergey, you gave me the following code but I don't know how to use it in the action list:-
Thanks.
Frederick
I have a large JPG image at this location:
http://www.ctsoftware.com.my/refimages/large.jpg
When I use the rvaActions's Insert Picture menu to insert the image into a RichViewEdit, I would like to set the image size to about 100 x 100 and also allow the user to resize it.
Sergey, you gave me the following code but I don't know how to use it in the action list:-
Code: Select all
rve.TopLevelEditor.BeginUndoGroup(rvutInsert);
rve.TopLevelEditor.SetUndoGroupMode(True);
if rve.InsertPicture(...) then begin
rve.SetCurrentItemExtraIntProperty(rvepImageHeight, 100, True);
rve.SetCurrentItemExtraIntProperty(rvepImageWidth, 100, True);
// The following line to be removed to allow user resize
rve.SetCurrentItemExtraIntProperty(rvepResizable, 0, True);
end;
rve.TopLevelEditor.SetUndoGroupMode(False);
Frederick