MQWidget.CheckListBox class

A check list box class.

Super classes: MQWidget.WidgetBase

Property

get set Type Name Description
x x int currentIndex a current index
x x int visibleRow a number of visible rows
x x float lineHeightRate a rate of a line height
x x bool vertScrollVisible a visibility of a vertical scroll bar
x x bool multiSelect multiple selection

Method

Member Description
ListBox Constructor.
addItem Add an item.
deleteItem Delete an item.
clearItems Delete all items.
getItemCount Get a number of items.
getItem Get an item.
setItem Set an item.
getItemTag Get an item tag.
setItemTag Set a tag of an item.
getItemSelected Get a selection status of an item.
setItemSelected Set a selection status of an item.
getItemChecked Get a checked status of an item.
setItemChecked Set a checked status of an item.
getItemHint Get a hint string of an item.
setItemHint Set a selection status of an item.
clearSelection Deselect all items.
makeItemVisible Adjust a position of a scroll bar to display the specified item.
addChangedEvent Add an event when a current index has been changed.

ListBox([parent])

Constructor.

Parameters:
MQWidget.WidgetBase parent - A parent widget

addItem(text)

Add an item.

Parameters:
string text - an item text
Return value:
int - an index of the added item

deleteItem(index)

Delete an item.

Parameters:
int index - an index

clearItems

Delete all items.

getItemCount

Get a number of items.

Return value:
int - a number of items

getItem(index)

Get an item.

Parameters:
int index - an index of an item
Return value:
string - a text of the item

setItem(index, text)

Set an item.

Parameters:
int index - an index of an item
string text - a text of the item

getItemTag(index)

Get an item tag.

Parameters:
int index - an index of an item
Return value:
int - a tag of the item

setItemTag(index, tag)

Set a tag of an item.

Parameters:
int index - an index of an item
int tag - a tag of the item

getItemSelected(index)

Get a selection status of an item.

Parameters:
int index - an index of an item
Return value:
bool - a selection status of the item

setItemSelected(index, select)

Set a selection status of an item.

Parameters:
int index - an index of an item
bool select - a selection status of an item

getItemChecked(index)

Get a checked status of an item.

Parameters:
int index - an index of an item
Return value:
bool - a checked status of the item

setItemChecked(index, check)

Set a checked status of an item.

Parameters:
int index - an index of an item
bool check - a checked status of an item

getItemHint(index)

Get a hint string of an item.

Parameters:
int index - an index of an item
Return value:
string - a hint string

setItemHint(index, hint)

Set a selection status of an item.

Parameters:
int index - an index of an item
string hint - a hint string

clearSelection

Deselect all items.

makeItemVisible(index)

Adjust a position of a scroll bar to display the specified item.

Parameters:
int index - an index of an item

addChangedEvent(callback)

Add an event when a current index has been changed.

Parameters:
function(sender) callback - callback function