ListBox Class (Typed) |
|
Namespace: XSharp.VO.SDK
The ListBox type exposes the following members.
| Name | Description | |||
|---|---|---|---|---|
| Caption |
The string representing the caption of the list box.
(Overrides Caption.) | |||
| CurrentItem |
A string representing the displayed list box or combo box item selected.
(Overrides CurrentItem.) | |||
| CurrentItemNo |
A numeric value, between 1 and the ListBox:ItemCount, indicating which item is currently selected.
(Overrides CurrentItemNo.) | |||
| CurrentText |
ListBox:CurrentText is set to the NULL_STRING, since there is no text editing for list boxes.
(Overrides CurrentText.) | |||
| MultiSelection |
Used to identify if the ListBox supports multiple selections.
| |||
| SelectedCount |
A numeric value representing the total number of items that are currently selected in a multiple selection list box.
| |||
| SelectedFile | ||||
| TextValue |
A string representing the display value (first array's element) for the currently selected item.
(Overrides TextValue.) |
| Name | Description | |
|---|---|---|
| AddItem |
Add a new item to a list box at a specified position.
(Overrides AddItem(Usual, Usual, Usual).) | |
| ChangeSelected |
Change a range of items in a multiple selection list box to a specified selection.
| |
| Clear | (Overrides Clear.) | |
| ClearSelection |
Clear a multiple selection list box of all selections.
| |
| DeleteItem |
Remove an item from a list box.
(Overrides DeleteItem(Long).) | |
| DeselectItem |
Turn off the selection of a specified item in a list box.
| |
| EnableItemDrag |
Turn the list box into a drag list box.
| |
| FillUsing |
Specify the set of values to be displayed in the list box, using an array or a data server. These values act as a constraint on the values that may be entered in the list box, and optionally as a translation between program values and display values.
| |
| FillUsingBySortedList |
Specify the set of values to be displayed in the list box, using an array or a data server. These values act as a constraint on the values that may be entered in the list box, and optionally as a translation between program values and display values.
| |
| FirstSelected |
Returns the position of the first item selected in a multiple selection list box, or 0 if no item is selected.
| |
| GetOptimalWidth | ||
| IsSelected |
Determine if the list box item at the specified index position is selected.
| |
| ListFiles | Obsolete.
Fill a list box with the names of all files that match the specified path or file name.
| |
| NextSelected |
After calling ListBox:FirstSelected(), this method is used to cycle through the remaining items selected in a multiple selection list box.
| |
| SelectItem |
Turn on the selection of an item in a list box.
| |
| SetTabs |
| All array index references start at 1. |
1CLASS MyWindow INHERIT TopAppWindow 2HIDDEN oLB AS OBJECT 3METHOD Init() CLASS MyWindow 4SUPER:Init() 5oLB := ListBox{SELF,42,Point{10,10},; 6Dimension{100,40}} 7oLB:AddItem("Pig") 8oLB:AddItem("Cow") 9oLB:AddItem("Horse") 10oLB:Show()
1RESOURCE IDD_ABOUT DIALOG 20, 20, 160, 80 2STYLE WS_POPUP | WS_DLGFRAME 3BEGIN 4LISTBOX IDL_ITEMLIST, 10, 10, 90, 40 5END