<< Click to display table of contents >> TCustomRichViewEdit.SetIntPropertyEd, SetStrPropertyEd, SetFloatPropertyEd |
Editing-style methods for changing properties of the editor.
procedure SetIntPropertyEd(Prop: TRVIntProperty;
Value: Integer; AutoReformat: Boolean);
procedure SetStrPropertyEd(Prop: TRVStrProperty;
const Value: TRVUnicodeString; AutoReformat: Boolean);
procedure SetFloatPropertyEd(Prop: TRVFloatProperty;
Value: TRVLength; AutoReformat: Boolean);
(introduced in version 15; changed in version 18)
Parameters:
Prop identifies the property to change. If the property is a property of enumerated type, use Ord(). If the property is a boolean property, any non-zero value means True.
Value – new property value.
If AutoReformat=True, the editor is reformatted (if necessary), and Change is called. Normally, this method is called with AutoReformat=True if you change a single property. If you call these methods multiple times for changing multiple properties, reformat (if necessary) and call Change yourself.
Method type: editing-style (unlike direct assignment to these properties).
Example 1: calling for a property of an enumerated type (using Ord):
MyRichViewEdit.SetIntPropertyEd(rvipBackgroundStyle, Ord(bsTiled), True);
Example 2: calling for a property of a boolean type (any nonzero value means True):
MyRichViewEdit.SetIntPropertyEd(rvipDPMirrorMargins, 1, True);
Example 3: calling for multiple properties:
//var NewMargins: TRect
if MyRichViewEdit.CanChange then begin
MyRichViewEdit.BeginUndoGroup(rvutLayout);
MyRichViewEdit.SetUndoGroupMode(True);
MyRichViewEdit.SetIntPropertyEd(rvipLeftMargin, NewMargins.Left,
False);
MyRichViewEdit.SetIntPropertyEd(rvipTopMargin, NewMargins.Top,
False);
MyRichViewEdit.SetIntPropertyEd(rvipRightMargin, NewMargins.Right,
False);
MyRichViewEdit.SetIntPropertyEd(rvipBottomMargin, NewMargins.Bottom,
False);
MyRichViewEdit.SetUndoGroupMode(False);
MyRichViewEdit.Reformat;
MyRichViewEdit.Change;
end;
See also methods: