dh_Listbox:
Same as Lokasenna Listbox except for:
Changed some property names and default values.
Added ability to change line height and scrollbar width.
Frame color, by default, uses highlight/lowlight colors that
are automatically calculated from the 'col_backdrop' color.
However, the frame can be set to use a single color (specified
by the 'col_frame' property) by setting
'frame_use_outline' property to true. Some themes can call for
single color outlines regardless of the 'frame_use_outline' setting.
Added ability to change the selected text highlight color.
The property 'col_sel_text' specifies the highlight color.
That color is ADDED to the list background color to produce
the highlight.
The GUI color 'sel_txt' is an alpha adjusted color.
If 'sel_txt' color is specified it will use
its alpha and color. Otherwise it will use the
specified color with a default alpha of 0.5.
The scrollbar color is specified with the 'col_track' color.
Scrollbar thumb and outline are automatically calculated using it.
Added property 'curr_sel' to hold index of last selected item.
May be useful when no 'multi-select'. Modified onmouseup to set 'curr_sel'.
Modified GUI.dh_Listbox:val to return list item index and
list item value when no 'multi-select'.
list Property:
The 'list' property hold the values that will be displayed in the listbox.
It accepts either a comma-separated string of options or a table.
(If you change the list at run-time using a comma-separated string,
you'll need to call GUI.elms.my_list:init() afterward to have the
string parsed into a table.
--------------------------------------------------------
attribute: property_name default value
--------------------------------------------------------
list: list {}
multiple select: multi false
scrollbar width: scrollbar_width 8
shadow element: shadow false
caption: caption ""
caption font: font_caption "sans22"
caption position: cap_pos "top"
caption offset x: cap_pad_x 4
caption offset y: cap_pad_y 4
caption centered: cap_centered false
shadow caption: shadow_caption false
text font: font_text "sans22"
padding: pad 4
line height line_height 1.20
override sel alpha: use_sel_alpha false
override value: sel_alpha 0.5
frame outline: frame_use_outline false
frame thickness: frame_thk 2
allow sel.outline: allow_sel_outline false
-- colors --
list bg: col_bg "elm_bg"
list frame: col_frame "elm_frame"
list text: col_text "elm_txt"
selected text: col_sel_text "sel_txt"
caption text: col_cap_text "txt"
scrollbar track: col_track "btn_face"
-- Following two maybe automated.
scrollbar thumb: col_thumb "btn_txt"
scrollbar outline: col_sb_outline "elm_outline"
elm sel.outline: col_active "elm_active"
backdrop: col_backdrop "wnd_bg"
--------------------------------------------------------