Struct native_windows_gui::ListBox [] [src]

pub struct ListBox<D: Clone + Display> { /* fields omitted */ }

A listbox control

Methods

impl<D: Clone + Display> ListBox<D>
[src]

Return the number of items in the inner collection

Return the inner collection of the listbox

Return the inner collection of the listbox, mutable. If the inner listbox is changed, listbox.sync must be called to show the changes in the listbox

Reload the content of the listbox

Add an item at the end of the listbox. Updates both the inner collection and the ui.

Remove an item from the inner collection and the listbox. Return the removed item.
Panics if index is out of bounds.

Insert an item at the selected position in the lisbox and the inner collection.
If index is -1, the item is added at the end of the list.

Return the index of currently selected item.
Return None if there is no selected item If the listbox can have more than one selected item, use get_selected_indexes

Return a vector filled with the selected indexes of the listbox. If nothing is selected or the listbox do not support multiple selection, the returned vector will be empty.

Return true if index is currently selected in the listbox

Set the selected index in a single choice listbox.
For multi-select listbox use set_index_selected or set_range_selected
If index is usize::max_value, remove the selected index from the listbox

Set the selected state of the item located at index. Only work for multi-select listbox For single listbox, use set_selected_index If index is usize::max_value, the change is applied to every item.

Select or unselect a range of index in the list box. The range is inclusive. Only work if the listbox can have multiple items selected.
For single listbox, use set_selected_index

Return the number of selected items.

Remove every item in the inner collection and in the listbox

Try to find an item with the text text in the collection. If one is found, return its index else, returns None.
If full_match is true, the text must match exactly otherwise it only needs to match the beginning. The search is NOT case sensitive.

Return the item text at the provided index. Returns None if the index is not valid.

Return true if the listbox is currently in a readonly mode, false otherwise.

Set or unset the listbox readonly flag

Return true if the listbox accepts multiple selected items, false otherwise.

Set or unset the listbox multiple selected flag

Trait Implementations

impl<D: Clone + Display> Control for ListBox<D>
[src]

Should return the underlying handle to the object

Should return the type of the control. For custom controls, the return value should be Undefined (the default).

If specified, should free any ressource allocated in the template build function. This includes functions like DestroyWindow.