Skip to content

scrollistbox

DevGeniusCode edited this page Mar 14, 2025 · 1 revision

ScrollListBox Control

The ScrollListBox control is used for displaying a scrollable list of items. You can define the position, size, and appearance of the list box, and it updates automatically as the user scrolls.

Available Tags

In addition to the default control tags, the ScrollListBox control has the following unique tags:

TagDescription
LISTBOXDATADefines specific properties of the list box, such as length, and selection options.
LISTBOXENABLEDDOWNBUTTONDRAWDATAVisual texture for the down button of the list box when enabled.
LISTBOXDISABLEDDOWNBUTTONDRAWDATAVisual texture for the down button of the list box when disabled.
LISTBOXHILITEDOWNBUTTONDRAWDATAVisual texture for the down button of the list box when highlighted.
LISTBOXENABLEDUPBUTTONDRAWDATAVisual texture for the up button of the list box when enabled.
LISTBOXDISABLEDUPBUTTONDRAWDATAVisual texture for the up button of the list box when disabled.
LISTBOXHILITEUPBUTTONDRAWDATAVisual texture for the up button of the list box when highlighted.
LISTBOXENABLEDSLIDERDRAWDATAVisual texture for the slider (scroll bar) in the list box when enabled.
LISTBOXDISABLEDSLIDERDRAWDATAVisual texture for the slider (scroll bar) in the list box when disabled.
LISTBOXHILITESLIDERDRAWDATAVisual texture for the slider (scroll bar) in the list box when highlighted.
SLIDERTHUMBENABLEDDRAWDATAVisual texture for the slider thumb (handle) when enabled.
SLIDERTHUMBDISABLEDDRAWDATAVisual texture for the slider thumb (handle) when disabled.
SLIDERTHUMBHILITEDRAWDATAVisual texture for the slider thumb (handle) when highlighted.

Default Values and Usage

The following section list the default values and available textures for each tag

Click to expand

LISTBOXDATA

  • LENGTH: The maximum number of items that can be displayed on the listbox (e.g., 100).
  • AUTOSCROLL: Defines if the listbox should scroll automatically to the selected item 0 = disabled, 1 = enabled.
  • AUTOPURGE: Defines if the listbox should remove items that are not visible 0 = disabled, 1 = enabled.
  • SCROLLBAR: Defines if the scrollbar should be visible 0 = disabled, 1 = enabled.
  • MULTISELECT: Defines if the listbox should allow multiple items to be selected 0 = disabled, 1 = enabled.
  • COLUMNS: The number of columns in the listbox. (e.g. 4).
  • COLUMNSWIDTH: The width of each column in pixels. (e.g. COLUMNSWIDTH: 30, COLUMNSWIDTH: 20, COLUMNSWIDTH: 25, COLUMNSWIDTH: 25 for a four columns listbox)
  • FORCESELECT: If you set it to 1, the first item will always be selected.

ENABLEDDRAWDATA, DISABLEDDRAWDATA, HILITEDRAWDATA

  • BlackSquare / NoImage / BlackSquare
  • ListBoxHiliteItemLeftEnd / NoImage / ListBoxHiliteSelectedItemLeftEnd
  • ListBoxHiliteItemRightEnd / NoImage / ListBoxHiliteSelectedItemRightEnd
  • ListBoxHiliteItemRepeatingCenter / NoImage / ListBoxHiliteSelectedItemRepeatingCenter
  • ListBoxHiliteItemSmallRepeatingCenter / NoImage / ListBoxHiliteSelectedItemSmallRepeatingCenter
  • NoImage

LISTBOXENABLEDUPBUTTONDRAWDATA, LISTBOXDISABLEDUPBUTTONDRAWDATA, LISTBOXHILITEUPBUTTONDRAWDATA

  • VSliderUpButtonEnabled / VSliderUpButtonDisabled / VSliderUpButtonHilite
  • VSliderUpButtonHiliteSelected / NoImage / VSliderUpButtonHiliteSelected

LISTBOXENABLEDDOWNBUTTONDRAWDATA, LISTBOXDISABLEDDOWNBUTTONDRAWDATA, LISTBOXHILITEDOWNBUTTONDRAWDATA

  • VSliderDownButtonEnabled / VSliderDownButtonDisabled / VSliderDownButtonHilite
  • VSliderDownButtonHiliteSelected / NoImage / VSliderDownButtonHiliteSelected

LISTBOXENABLEDSLIDERDRAWDATA, LISTBOXDISABLEDSLIDERDRAWDATA, LISTBOXHILITESLIDERDRAWDATA

  • VSliderEnabledTopEnd / VSliderDisabledTopEnd / VSliderHiliteTopEnd
  • VSliderEnabledBottomEnd / VSliderDisabledBottomEnd / VSliderHiliteBottomEnd
  • VSliderEnabledRepeatingCenter / VSliderDisabledRepeatingCenter / VSliderHiliteRepeatingCenter
  • VSliderEnabledSmallRepeatingCenter / VSliderDisabledSmallRepeatingCenter / VSliderHiliteSmallRepeatingCenter
  • NoImage

SLIDERTHUMBENABLEDDRAWDATA, SLIDERTHUMBDISABLEDDRAWDATA, SLIDERTHUMBHILITEDRAWDATA

  • ScrollBarThumbEnabled / ScrollBarThumbDisabled / ScrollBarThumbHilite
  • ScrollBarThumbHiliteSelected / NoImage / ScrollBarThumbHiliteSelected
  • NoImage

How it Works

The ScrollListBox control uses multiple textures to create the visual effect of a scrollable list.

Important Notes

  • Column Widths: When using multiple columns, the sum of the COLUMNSWIDTH values must not exceed the width of the SCREENRECT.
  • DRAWDATA: Each DRAWDATA tag consists of a sequence of exactly 9 entries, each defining how a specific part of the control's texture should be rendered. The order and position of the textures within DRAWDATA is critical and must be defined correctly according to each state of the listbox.

Example

Here's an example from the ReplayMenu.wnd file:

Click to expand
WINDOW WINDOWTYPE = SCROLLLISTBOX; SCREENRECT = UPPERLEFT: 68152, BOTTOMRIGHT: 552428, CREATIONRESOLUTION: 800600; NAME = "ReplayMenu.wnd:ListboxReplayFiles"; STATUS = ENABLED; STYLE = SCROLLLISTBOX+MOUSETRACK; SYSTEMCALLBACK = "[None]"; INPUTCALLBACK = "[None]"; TOOLTIPCALLBACK = "[None]"; DRAWCALLBACK = "[None]"; FONT = NAME: "Arial", SIZE: 10, BOLD: 0; HEADERTEMPLATE = "LabelRegular"; TOOLTIPDELAY = -1; TEXTCOLOR = ENABLED: 254254254255, ENABLEDBORDER: 000255, DISABLED: 192192192255, DISABLEDBORDER: 646464255, HILITE: 128128255255, HILITEBORDER: 00128255; ENABLEDDRAWDATA = IMAGE: BlackSquare, COLOR: 000126, BORDERCOLOR: 4955168255, IMAGE: ListBoxHiliteItemLeftEnd, COLOR: 2552550255, BORDERCOLOR: 254254254255, IMAGE: ListBoxHiliteItemRightEnd, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: ListBoxHiliteItemRepeatingCenter, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: ListBoxHiliteItemSmallRepeatingCenter, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550; DISABLEDDRAWDATA = IMAGE: NoImage, COLOR: 255400, BORDERCOLOR: 4955168255, IMAGE: NoImage, COLOR: 192192192255, BORDERCOLOR: 254254254255, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550; HILITEDRAWDATA = IMAGE: BlackSquare, COLOR: 000126, BORDERCOLOR: 4955168255, IMAGE: ListBoxHiliteSelectedItemLeftEnd, COLOR: 254254254255, BORDERCOLOR: 01280255, IMAGE: ListBoxHiliteSelectedItemRightEnd, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: ListBoxHiliteSelectedItemRepeatingCenter, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: ListBoxHiliteSelectedItemSmallRepeatingCenter, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550; LISTBOXDATA = LENGTH: 100, AUTOSCROLL: 0, AUTOPURGE: 0, SCROLLBAR: 1, MULTISELECT: 0, COLUMNS: 4, COLUMNSWIDTH: 30, COLUMNSWIDTH: 20, COLUMNSWIDTH: 25, COLUMNSWIDTH: 25, FORCESELECT: 1; LISTBOXENABLEDUPBUTTONDRAWDATA = IMAGE: VSliderUpButtonEnabled, COLOR: 25500255, BORDERCOLOR: 255128128255, IMAGE: VSliderUpButtonHiliteSelected, COLOR: 2552550255, BORDERCOLOR: 254254254255, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550; LISTBOXDISABLEDUPBUTTONDRAWDATA = IMAGE: VSliderUpButtonDisabled, COLOR: 128128128255, BORDERCOLOR: 192192192255, IMAGE: NoImage, COLOR: 192192192255, BORDERCOLOR: 254254254255, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550; LISTBOXHILITEUPBUTTONDRAWDATA = IMAGE: VSliderUpButtonHilite, COLOR: 02550255, BORDERCOLOR: 01280255, IMAGE: VSliderUpButtonHiliteSelected, COLOR: 254254254255, BORDERCOLOR: 01280255, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550; LISTBOXENABLEDDOWNBUTTONDRAWDATA = IMAGE: VSliderDownButtonEnabled, COLOR: 25500255, BORDERCOLOR: 255128128255, IMAGE: VSliderDownButtonHiliteSelected, COLOR: 2552550255, BORDERCOLOR: 254254254255, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550; LISTBOXDISABLEDDOWNBUTTONDRAWDATA = IMAGE: VSliderDownButtonDisabled, COLOR: 128128128255, BORDERCOLOR: 192192192255, IMAGE: NoImage, COLOR: 192192192255, BORDERCOLOR: 254254254255, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550; LISTBOXHILITEDOWNBUTTONDRAWDATA = IMAGE: VSliderDownButtonHilite, COLOR: 02550255, BORDERCOLOR: 01280255, IMAGE: VSliderDownButtonHiliteSelected, COLOR: 254254254255, BORDERCOLOR: 01280255, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550; LISTBOXENABLEDSLIDERDRAWDATA = IMAGE: VSliderEnabledTopEnd, COLOR: 25519000, BORDERCOLOR: 4755168255, IMAGE: VSliderEnabledBottomEnd, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: VSliderEnabledRepeatingCenter, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: VSliderEnabledSmallRepeatingCenter, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550; LISTBOXDISABLEDSLIDERDRAWDATA = IMAGE: VSliderDisabledTopEnd, COLOR: 1281281280, BORDERCOLOR: 1481120255, IMAGE: VSliderDisabledBottomEnd, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: VSliderDisabledRepeatingCenter, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: VSliderDisabledSmallRepeatingCenter, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550; LISTBOXHILITESLIDERDRAWDATA = IMAGE: VSliderHiliteTopEnd, COLOR: 025500, BORDERCOLOR: 4955168255, IMAGE: VSliderHiliteBottomEnd, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: VSliderHiliteRepeatingCenter, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: VSliderHiliteSmallRepeatingCenter, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550; SLIDERTHUMBENABLEDDRAWDATA = IMAGE: ScrollBarThumbEnabled, COLOR: 255400, BORDERCOLOR: 25524328255, IMAGE: ScrollBarThumbHiliteSelected, COLOR: 2552550255, BORDERCOLOR: 254254254255, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550; SLIDERTHUMBDISABLEDDRAWDATA = IMAGE: ScrollBarThumbDisabled, COLOR: 128128128255, BORDERCOLOR: 192192192255, IMAGE: NoImage, COLOR: 192192192255, BORDERCOLOR: 254254254255, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550; SLIDERTHUMBHILITEDRAWDATA = IMAGE: ScrollBarThumbHilite, COLOR: 02550255, BORDERCOLOR: 01280255, IMAGE: ScrollBarThumbHiliteSelected, COLOR: 254254254255, BORDERCOLOR: 01280255, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550, IMAGE: NoImage, COLOR: 2552552550, BORDERCOLOR: 2552552550;END

See also

Clone this wiki locally