Procedure Tftext.TryChangeFontSize(aImgPreview : TImageEnVect) ; Var iCTR, iSelObj : Integer ; Begin For iCTR := 0 to aImgPreview.SelObjectsCount-1 do begin iSelObj := aImgPreview.SelObjects[iCTR]; aImgPreview.ObjFontHeight[iSelObj] := CharInfo.Font.Size ; //aImgPreview.ObjFontStyles[iSelObj] := CharInfo.Font.Style ; if BoldButton.Down then CharInfo.Font.Style := CharInfo.Font.Style + [fsBold] else CharInfo.Font.Style := CharInfo.Font.Style - [fsBold]; if ItalicButton.Down then CharInfo.Font.Style := CharInfo.Font.Style + [fsItalic] else CharInfo.Font.Style := CharInfo.Font.Style - [fsItalic]; if UnderlineButton.Down then CharInfo.Font.Style := CharInfo.Font.Style + [fsUnderline] else CharInfo.Font.Style := CharInfo.Font.Style - [fsUnderline]; aImgPreview.ObjFontName[iSelObj] := FontName.Text; aImgPreview.ObjFontStyles[iSelObj] := CharInfo.Font.Style ; //aImgPreview.ObjTextEditable[iSelObj] := True ; aImgPreview.Update ; end; End; ----------------------- procedure Tftext.Controls2MemoText(Sender: TObject); var sText: String; // iCurrobj: Integer; begin if not changing then begin changing := True; // sText := TImageEnvect(frmViewImage.PopupMenu.PopupComponent).ObjText[TImageEnvect(frmViewImage.PopupMenu.PopupComponent).SelObjects[0]]; if frmViewImage.pgReport.TabIndex = 0 then CharInfo := frmViewImage.Imgpreview1.MemoEditingGetCharInfo else CharInfo := frmViewImage.Imgpreview2.MemoEditingGetCharInfo; // font if BoldButton.Down then CharInfo.Font.Style := CharInfo.Font.Style + [fsBold] else CharInfo.Font.Style := CharInfo.Font.Style - [fsBold]; if ItalicButton.Down then CharInfo.Font.Style := CharInfo.Font.Style + [fsItalic] else CharInfo.Font.Style := CharInfo.Font.Style - [fsItalic]; if UnderlineButton.Down then CharInfo.Font.Style := CharInfo.Font.Style + [fsUnderline] else CharInfo.Font.Style := CharInfo.Font.Style - [fsUnderline]; CharInfo.Font.Name := FontName.Text; CharInfo.Font.Size := StrToIntDef(FontSize.Text, 10); CharInfo.Font.Color := ColorSelect.Brush.Color; // align if LeftAlign.Down then CharInfo.Align := iejLeft; if CenterAlign.Down then CharInfo.Align := iejCenter; if RightAlign.Down then CharInfo.Align := iejRight; if JustifyAlign.Down then CharInfo.Align := iejJustify; if frmViewImage.pgReport.TabIndex = 0 then Begin frmViewImage.Imgpreview1.MemoEditingSetCharInfo(CharInfo); TryChangeFontSize(frmViewImage.Imgpreview1); End Else Begin frmViewImage.Imgpreview2.MemoEditingSetCharInfo(CharInfo); TryChangeFontSize(frmViewImage.Imgpreview2); End; //CharInfo.free; changing := false; end; end;