trichview.com

trichview.support




Re: sample / info Method SetItemExtraIntProperty


Return to index


Author

Message

s2o

Posted: 07/04/2002 1:07:33


> I need to change the size of an image in my rve. I know i need to use the

> SetItemExtraIntProperty method. Only i don't know how. Does anyone have a

> little example?


This is from an old msg of Sergey in this newsgroup:


Size adjustment is available for standard implementation of metafiles, bmp


and jpeg.


It is not available for icons.


There are several different gif implementations, you can test them yourself.


This code scales the current image (in the position of caret) to 100 x 100:


// minimal code:


if rve.CurItemStyle in [rvsPicture, rvsHotPicture] then


begin


RichViewEdit1.SetCurrentItemExtraIntProperty(rvepImageHeight, 100, False);


RichViewEdit1.SetCurrentItemExtraIntProperty(rvepImageWidth, 100, True);


end;




OR




// if you want these operations to be undone as one operation:


if rve.CurItemStyle in [rvsPicture, rvsHotPicture] then


begin


MyRichViewEdit.BeginUndoGroup(rvutModifyItem);


MyRichViewEdit.SetUndoGroupMode(True);


RichViewEdit1.SetCurrentItemExtraIntProperty(rvepImageHeight, 100, False);


RichViewEdit1.SetCurrentItemExtraIntProperty(rvepImageWidth, 100, True);


MyRichViewEdit.SetUndoGroupMode(False);


end;







Powered by ABC Amber Outlook Express Converter