When I insert a picture (JPG or PNG) from file, the image container resizes to match the picture size.
Is it possible to force the image container to remain at a certain size and not resize?
Frederick
Prevent Image Resizing On Insert
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Inserting picture with resizing it to 100x100:
Instead of forbidding resizing for the given picture (using rvepResizable), you can forbid resizing for all pictures, by including rvoNoImageResize in rve.EditorOptions.
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);
rve.SetCurrentItemExtraIntProperty(rvepResizable, 0, True);
end;
rve.TopLevelEditor.SetUndoGroupMode(False);
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Remove the line
and the user will be able to resize this picture (if rvoNoImageResize is not in rve.EditorOptions)
Code: Select all
rve.SetCurrentItemExtraIntProperty(rvepResizable, 0, True);