ui ListBox Ext
ui listbox Ext
The listbox is a powerful yet simple to implement widget. You just set the items array with the strings you want to display in the list. Set the colors and hilite colors are really all you need to do. See the sample project listbox room to see the different options. To determine which item the user has selected use the itemindex property (-1 = no selection).
to assign items you use the items array:
items=’The first Item’;
items=’The second item’;
items=’The last item’;
itemindex = -1 (-1=no selection, or index of array of selection, 0=first item) To get the currently selected item from the listbox you use this variable.
uiDrawLines=true This will determine if you want lines drawn between lines.
uiDrawHeader=true Whether to draw the header bars.
uiDelayEvent=1 //number of steps to delay if you want to delay the press to call event (for highlighting). Normally the event object is fired when the mouse is pressed. If you want to delay that you would change this value.
uiMemo=”” You can display a listbox as a read-only memobox. Just disable the drawlines, and other items you don’t want in your memobox and set uiMemo to a string. This string is automatically broken apart, so you can write a large string here. You can use # to cause a new line in your memo string.
uiDrawHilite=true Draws the hilite bar, you would want to disable this if you are displaying it as a memobox.
uiCredits=false Nice little animation, if you setup the listbox as a memobox you can set this to true. It will scroll the listbox from top to bottom, and repeat. It is even better if you start your uiMemo string to start and end with a few ‘#’ to get some empty space and start and end. See sample project for example.
uiCustomDrawScript=-1 The listbox supports custom draw scripts, this is the property to set to your custom script for drawing each line item. See Custom Draw Section.
uiSurfaceHeight=0 //override surface height (Default is textheight * numitems) Normally you won’t need to manage this. For advance users only.
uiScrollArrows=true Display the scroll arrows on/off.
uiScrollColor=c_dkgray Color of the scroll arrows.
uiMoveToTop = false //will reset the drawy position to top If you are resetting the items array, and want to start displaying the list from the top. Just set uiMoveToTop=true and the list will refresh from the top.
maxLineHeight=128 The surface used by the listbox has clipping, this is the area before and after the list. This only should be changed if your max lineheight is going to be larger than 128 pixel.