ThtObjectEvent = procedure(Sender, Obj: TObject;
const Attribute: string) of Object;
The ThtObjectEvent type is the type for OnObjectFocus, OnObjectBlur, and OnObjectChange events.
In the above:
SenderThe THtmlViewer where the Object is located
ObjA pointer to the clicked object.
AttributeThe string assigned to the OnFocus, OnBlur, or OnChange attribute of the object's HTML tag.
Form controls currently support these events. Form controls are descendents of TFormControlObj. In particular, the TheControl property can give access to the underlying Delphi controls, such as TEdit, TButton, and TCheckbox with code similar to:
if (Obj is TFormControlObj) then
with TFormControlObj(Obj) do
if (TheControl is TButton) then .....
TFormControlObj also has an AttributeValue Property with which special user attributes can be accessed:
if (Obj is TFormControlObj) then
AttrValue := TFormControlObj(Obj).AttributeValue['MyAttr'];
See also: