На примере SrichViewEdit (ScaleRichViewEdit)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
uses ... RVGrHandler ... ... gr:=TGraphic.Create; gr := RVGraphicHandler.LoadFromFile(fMediaLoader_Inherited.LastUploaded.FilePath); ... SRichViewEdit1.ConvertToPixels;// Измерять будем в пикселях with SRichViewEdit1.ActiveEditor do begin BeginUpdate; TopLevelEditor.BeginUndoGroup(rvutInsert); TopLevelEditor.SetUndoGroupMode(True); if InsertPicture('', gr, rvvaBaseline) then begin SetCurrentItemExtraIntProperty(rvepImageWidth, 200, True); SetCurrentItemExtraIntProperty(rvepImageHeight, 300, True); end; TopLevelEditor.SetUndoGroupMode(False); EndUpdate; end; ... |