IWebBrowserBox.DocumentText

Syntax

DocumentText: String;

Description

The DocumentText property determines the HTML code of the page loaded in the WebBrowserBox component.

Example

Executing the example requires a form, a button named Button1 on the form, and the WebBrowserBox component named WebBrowserBox1.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Begin
    WebBrowserBox1.DocumentText :=
        "<! DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML//EN"" >" +
        "<HTML>" +
        "<HEAD>" +
        "<meta name = ""GENERATOR"" content = ""Microsoft® HTML Help Workshop 4.1"" >" +
        "<Title> Test text </Title>" +
        "</HEAD>" +
        "<BODY>" +
        "<H1>TEST</H1>" +
        "</BODY>" +
        "</HTML>"
End Sub Button1OnClick;

After executing the example, clicking the button loads the test page to the WebBrowserBox1 component.

See also:

IWebBrowserBox