rvico TRichView Reference | TRichViewEdit

TCustomRichViewEdit.SetBackgroundImageEd

Top  Previous  Next

An editing-style method for changing BackgroundBitmap.

procedure SetBackgroundImageEd(Graphic: TGraphic; AutoReformat: Boolean);

(introduced in version 15)

Parameters:

Graphic – a graphic to assign to BackgroundBitmap. If Graphic is not TBitmap, it is converted to TBitmap. After calling this method, the component uses a copy of Graphic, so you must free Graphic yourself.

If AutoReformat=True, Change is called. Normally, this method is called with AutoReformat=True if you change a single property. If you call this method together with other methods in a group, this parameter must be False, and you must call Change yourself.

 

Method type: editstyle editing-style (unlike direct assignment to BackgroundBitmap).

 

Example:

if MyRichViewEdit.CanChange then begin

  MyRichViewEdit.BeginUndoGroup(rvutBackground);
  MyRichViewEdit.SetUndoGroupMode(True);

  MyRichViewEdit.SetIntPropertyEd(rvipBackgroundStyle, Ord(bsTiled), False);

  MyRichViewEdit.SetBackgroundImageEd(Image1.Picture.Graphic, False);

  MyRichViewEdit.SetUndoGroupMode(False);
  MyRichViewEdit.Invalidate;
  MyRichViewEdit.Change;

end;

See also methods:

SetIntPropertyEd, SetStrPropertyEd, SetFloatPropertyEd.


TRichView © trichview.com