dh_Panel:
Draws a rectangle using the color specified in 'col_bg'.
It can have an optional border and optional rounded corners.
Properties:
border_width:
If greater than 0 then a border will be drawn around the element.
radius:
If greater than 0 then the element will be drawn with rounded corners.
If showing a border then the radius is to the inside of the border.
shadow:
If true the panel will be drawn with shadows.
text:
The Panel can display text with adjustable line height.
Although the tyext can be updated dynamically, It is only for displaying,
and not editing the text (think glorified label).
Line height can be defined using a number multiplier.
If using 'use_pixels' it overrides 'line_height' and uses
the 'line_height_pixels' value as the line height.
No scrolling or word wrap. If need scrolling use dh_Listbox.
(As of 3-18-2026 text only accepts a table of string values.)
The Panel can be used like a button. (Actually, any element
can be used as a button by overriding its mouseup event.)
func:
The name of a function which is to be called when clicking on the panel.
params:
Any parameters to be passed to the function.
-------------------------------------------------------
attribute: property_name default value
-------------------------------------------------------
border width: border_width 2
radius: radius 0
shadow panel: shadow false
caption: caption ""
caption font: font_caption "sans22"
caption offset x: cap_x 4
caption offset y: cap_y 4
caption centered: cap_centered false
shadow caption: shadow_caption false
text: text nil
text font: font_text "mono16"
text padding: pad 4
line height: line_height 1.25
use pixels: use_pixels false
pixels: line_height_pixels 24
function: func function()end
parameters: params {...}
-- colors --
background: col_bg "wnd_bg"
border: col_border "panel_border"
text: col_text "txt"
caption text: col_cap_text "txt"
backdrop: col_backdrop "wnd_bg"
-------------------------------------------------------