Using The THtmlViewer Component


THtmlViewer Reference

Tasks

To load an HTML document from a file, use the LoadFromFile method. To load a document from a stream, use the LoadFromStream method. To load a document from a unicode string, use the LoadFromString method. To load a document from an ansistring, use a TBuffer and the LoadFromBuffer method. ( Deprecated ) To load a document from an ansistring, use a TBuffer and the LoadFromDocument method.

Use the Position property to save a location in a document and return to it later. For positioning to a Name field in the document, use the PositionTo method.

To customize response to clicking on a hotspot, respond to the OnHotSpotClick event.

To implement a status line which shows what URL a hot spot corresponds to, respond to the OnHotSpotCovered event.

Use the DefFontName, DefFontSize, DefFontColor, DefHotSpotColor, and DefBackground properties to change the default font and color characteristics for general display. Use the HTML <body> tag and it's attributes to specify the appearance of a particular HTML document.

To implement a history list and/or Back|Forward buttons, see Setting up a History List.