Skip to content

HtmlPanel

The HtmlPanel controller (TKXHtmlPanelController, unit Kitto.Html.HtmlPanel) displays custom, static HTML content. Use it for welcome pages, informational panels, dashboards built from your own markup, or anywhere you want full control over the rendered HTML.

It inherits dialog/overlay support from TKXPanelControllerBase, so the common panel properties (IsModal, Maximized, AllowClose, Width, Height, …) apply.

Inline HTML

Provide the markup directly in the Html node:

yaml
Controller: HtmlPanel
  Html: '<p><img src="%IMAGE(kitto_logo_150)%" width="150" height="47"></p>'

The Html node supports Macros (such as %IMAGE(...)%), which are expanded server-side before the fragment is rendered.

HTML from a resource file

Instead of inline markup you can point to a file under the application Resources folder with the FileName node:

yaml
Controller: HtmlPanel
  FileName: welcome.html

The file is resolved through the standard resource lookup and rendered according to its content:

  • HTML fragment (no <html> / <!DOCTYPE>): macros are expanded and the markup is injected directly into the panel.
  • Complete HTML document (starts with <html> or <!DOCTYPE>): it is loaded in an <iframe> that fills the panel, isolating its CSS from the rest of the application.

If the file cannot be found, the panel shows a File not found: message.

Properties

PropertyDescription
HtmlInline HTML content to display. Supports macros.
FileNameResource file name containing the HTML to display. Supports macros; full HTML documents are isolated in an <iframe>.

If both are present, FileName takes precedence.

CSS

The panel root element carries the kx-html-panel CSS class, which you can target from your application stylesheet.

Released under Apache License, Version 2.0.