Struct native_windows_gui::ComboBox [] [src]

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

A combobox control

Methods

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

Return the number of items in the inner collection

Return the inner collection of the combobox

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

Reload the content of the combobox

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

Remove an item from the inner collection and the combobox. 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.

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 index of currently selected item.
Return None if there is no selected item

Return the currently selected element text. Returns "" if no item is selected.

Set the selected index in a combobox.
If index is usize::max_value, remove the selected index from the combobox

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

Set a new placeholder for the combobox. To remove the current placeholder, send ""
The maximum length of the placeholder is 255 characters

Return true if the combobox dropdown is visible

Show or hide the control dropdown

Remove every item in the inner collection and in the combobox

Trait Implementations

impl<D: Clone + Display> Control for ComboBox<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.