Skip to content

TWebHTMLContainer

Description

Below is a list of the most important properties methods and events for TWebHTMLContainer. TWebHTMLContainer is basically a placeholder to add any HTML to be rendered on the page directly on the form. The HTML is added as text via the property WebHTMLContainer.HTML. The outer element of the HTML container is a DIV element.

Designtime Runtime

HTML template tag

The HTML tag the component can be associated with in an HTML template. Assign the ID attribute with a unique value and set the identical value to the ElementID property. Detailed information can be found in the Use of HTML templates topic.

HTML tag <Span ID=”UniqueID”></Span>
ElementID UniqueID

Properties for TWebHTMLContainer

Properties Description
HTML A stringlist holding the HTML (as text) that will be rendered in a DIV
ElementClassName Optionally sets the CSS classname for the label when styling via CSS is used
ElementID Optionally sets the HTML element ID for a HTML element in the form HTML file the label needs to be connected with. When connected, no new label is created but the Delphi class is connected with the existing HTML element in the form HTML file

Events for TWebHTMLContainer

Properties Description
OnClick Event triggered when the outer DIV of the HTML container is clicked
OnDblClick Event triggered when the outer DIV of the HTML container is double-clicked
OnMouseDown Event triggered when the mouse goes down on the outer DIV of the HTML container
OnMouseUp Event triggered when the mouse goes up on the outer DIV of the HTML container
OnMouseMove Event triggered when the mouse moves over the outer DIV of the HTML container