ListBoxes - Owner-Draw HTML ListBoxes


You can now use HTML in a standard Xdialog Listbox. To use HTML, you use the 'HTML' directive in the Listbox definition.

For example:

MyList = <<%html%
'This is a multi-line item - Line1
'This is a multi-line item - Line2

MyItem = "1"

dim pg as p
pg.BodyText = "The contents of this standard Xdialog ListBox is populated with HTML content. The 'directives' section in the ListBox definition contains the 'HTML' directive and the 'D' directive, which makes the height of each line in the listbox dynamic."
pg.HeadingText = "HTML ListBox"
pg.Image = ""

ui_dlg_box("Xdialog with HTML ListBox",<<%dlg%
ListBox populated with HTML content:;
Current selection:;

Notice in this example that the data in the ListBox is a CRLF delimited list. Each row in the list can contain HTML. The HTML must appear on a single line. The ListBox command uses the 'HTML' and 'D' directives. 'HTML' enables HTML formatting and the 'D' directive enables dynamic line heights.