ListBox (hwx.gui)¶
A ListBox widget.
- Inherits:
Properties¶
Public Methods¶
Property Details¶
Gets/Sets items of the ListBox
Gets/Sets the current selected index.
Determines the way the items can be viewed.
- Args:
- value (ListBox.viewMode): The type of view to allow.
Method Details¶
-
append(self, item)
Appends an item to the end of the ListBox.
| param item: | Text value to be inserted. |
|---|---|
| type item: | str |
-
clear(self)
Removes all items of the List Box.
-
insert(self, item, index=9999999)
Inserts an item in the ListBox at position index.
By default it gets appended to the end.
| param item: | Text value to be inserted. |
|---|---|
| type item: | str |
| param index: | Index at which item is inserted. |
| type index: | int |
-
remove(self, index)
Remove item at index from List Box.
| param index: | index of item to be removed. |
|---|---|
| type index: | int |
-
sort(self, ascending=True)
Sorts the items in the ListBox, based on their text.
| param ascending: | |
|---|---|
| If set to True, sort the items in ascending order. | |
| type ascending: | bool |