rvico TRichView Reference | TRichView

TCustomRichView.OnRVFControlNeeded

Top  Previous  Next

Occurs when reading inserted control from RVF file or stream, and this control was saved without its "body".

type

  TRVFControlNeededEvent =

    procedure(Sender: TCustomRichView; Name: String;

      const Tag: TRVTagvar ctrl: TControl) of object;

 

property OnRVFControlNeeded: TRVFControlNeededEvent;

By default, values of all published properties of controls are saved in RVF documents.

If you exclude rvfoSaveControlsBody from RichView.RVFOptions, none of control properties are saved. Only the item name (value returned by GetItemText) and tag (value returned by GetItemTag) are saved. These values allow to identify the control on loading. When reading such RVF files, OnRVFControlNeeded is called for each control.

 

Input parameters:

Name – name of the control's item (this is a value returned by GetItemText (converted to Unicode for Delphi/C++Builder 2009 or newer); do not confuse with Name property of controls, see Item types).

Tag tag of the control's item (this is a value returned by GetItemTag; do not confuse with Tag property of controls, see "Tags").

Output parameter:

ctrl – control to insert in document. Create this control in this event. Do not destroy it (RichView will destroy it when necessary).

 

See also:

RVF overview, contains example.


TRichView © trichview.com