Type TObjectTagEvent


Declaration

TObjectTagEvent = procedure(Sender: TObject; Panel: ThvPanel;

const Attributes, Params: TStringList; var WantPanel: boolean) of Object;

Description

The TObjectTagEvent type is the type for the OnObjectTag event. This event occurs when an <object> tag is encountered at document load time.

Senderthe THtmlViewer displaying the ThvPanel.

Panelthe ThvPanel (similar to TPanel) created for the display. Its Name property has been assigned to the NAME attribute value and its Height and Width properties have been assigned the values of the HEIGHT and WIDTH attributes.

Attributesa TStringList containing all the attributes found in the <object> tag. Individual attributes may be accessed using TStringList's Values property, as:

ClassId := Attributes.Values['classid'];

Paramsa TStringList containing the Name and Value attributes of all the <param> tags that immediately follow the <object> tag.

WantPanela boolean which should be set by the user. Setting WantPanel True indicates the ThvPanel is to be used. If, for some reason, the program can't make use of the ThvPanel, this parameter should be set to False and the panel will be free'd.

Usage Notes:

The two TStringLists are free'd by THtmlViewer immediately on return from the event. Any data needed after the event should be saved in the event handler.

If WantPanel is returned True, then HTML between the <object> and </object> tags is ignored. If WantPanel is False, then HTML following the <object> and <param> tags is displayed and acted on. It is possible to have a second <object> tag here providing a second choice for display.

The OnPanelPrint and OnPanelDestroy events will also be initiated by the ThvPanel created for the <object> tag.

See also:

OnObjecTag Event

<PANEL> Tag