SetPanelHtml panel,path$[,fragment$]

Parameters

panel - panel gadget to show the page in

path$ - path of a local HTML file

fragment$ (optional) - name of an anchor in the page to jump to, without the #; "" shows the top of the page (default)

Description

Shows a local HTML page inside a panel.

Use it for a help viewer, a readme, release notes or rich instructions in your tools. The page is shown by the Microsoft Edge WebView2 runtime, the same viewer the IDE's help uses, so links, styles and pictures work as they do in a browser. If WebView2 is not installed, a message explains what is missing.

The file name and the anchor are passed separately, so file names containing spaces or # characters still work. Calling SetPanelHtml again shows a new page in the same viewer, and PanelHtmlHistory steps Back and Forward through the pages it has shown.

The viewer fills the panel and follows it: it resizes with the panel, HideGadget, ShowGadget and ActivateGadget act on it, and it closes when the panel is freed. The page loads in the background, so it can appear a moment after the command returns.

Pair it with SetGadgetHelp to answer F1 over your controls with the matching help page.


See also: PanelHtmlHistory, SetGadgetHelp, CreatePanel, SetPanelImage.

Index