pub trait ComboTrait {
Show 23 methods
// Required method
fn as_ptr(&self) -> *mut Combo;
// Provided methods
fn on_filter<F>(&self, handler: F)
where F: FnMut(&EvText) -> EvTextFilter + 'static { ... }
fn on_change<F>(&self, handler: F)
where F: FnMut(&EvText) -> bool + 'static { ... }
fn text(&self, text: &str) { ... }
fn align(&self, align: Align) { ... }
fn tooltip(&self, text: &str) { ... }
fn color(&self, color: Color) { ... }
fn color_focus(&self, color: Color) { ... }
fn background_color(&self, color: Color) { ... }
fn background_color_focus(&self, color: Color) { ... }
fn placeholder_text(&self, text: &str) { ... }
fn placeholder_color(&self, color: Color) { ... }
fn placeholder_style(&self, style: FontStyle) { ... }
fn get_text(&self, index: u32) -> String { ... }
fn count(&self) -> u32 { ... }
fn add_element(&self, text: &str) { ... }
fn add_image_element<T>(&self, text: &str, image: &T)
where T: ImageTrait { ... }
fn set_element(&self, index: u32, text: &str) { ... }
fn set_image_element<T>(&self, index: u32, text: &str, image: &T)
where T: ImageTrait { ... }
fn insert_element(&self, index: u32, text: &str) { ... }
fn insert_image_element<T>(&self, index: u32, text: &str, image: &T)
where T: ImageTrait { ... }
fn delete_element(&self, index: u32) { ... }
fn duplicates(&self, duplicates: bool) { ... }
}Expand description
The combo trait.
Required Methods§
Provided Methods§
Sourcefn on_change<F>(&self, handler: F)
fn on_change<F>(&self, handler: F)
Set a function to be called when the text has changed.
§Remarks
This event will also be launched when you select an item from the list, a sign that the text has changed in the edit box. See Validate texts and GUI Events.
Sourcefn color_focus(&self, color: Color)
fn color_focus(&self, color: Color)
Sets the color of the text, when the control has the keyboard focus.
Sourcefn background_color(&self, color: Color)
fn background_color(&self, color: Color)
Set the background color.
Sourcefn background_color_focus(&self, color: Color)
fn background_color_focus(&self, color: Color)
Sets the background color when the control has keyboard focus.
Sourcefn placeholder_text(&self, text: &str)
fn placeholder_text(&self, text: &str)
Set an explanatory text for when the control is blank.
Sourcefn placeholder_color(&self, color: Color)
fn placeholder_color(&self, color: Color)
Set the color of the placeholder text.
Sourcefn placeholder_style(&self, style: FontStyle)
fn placeholder_style(&self, style: FontStyle)
Set the font style for the placeholder.
Sourcefn add_element(&self, text: &str)
fn add_element(&self, text: &str)
Add a new item to the drop-down list.
Sourcefn add_image_element<T>(&self, text: &str, image: &T)where
T: ImageTrait,
fn add_image_element<T>(&self, text: &str, image: &T)where
T: ImageTrait,
Add a new item with image to the drop-down list.
Sourcefn set_element(&self, index: u32, text: &str)
fn set_element(&self, index: u32, text: &str)
Edit an item from the drop-down list.
Sourcefn set_image_element<T>(&self, index: u32, text: &str, image: &T)where
T: ImageTrait,
fn set_image_element<T>(&self, index: u32, text: &str, image: &T)where
T: ImageTrait,
Edit an item with image from the drop-down list.
Sourcefn insert_element(&self, index: u32, text: &str)
fn insert_element(&self, index: u32, text: &str)
Insert an item in the drop-down list.
Sourcefn insert_image_element<T>(&self, index: u32, text: &str, image: &T)where
T: ImageTrait,
fn insert_image_element<T>(&self, index: u32, text: &str, image: &T)where
T: ImageTrait,
Insert an item with image in the drop-down list.
Sourcefn delete_element(&self, index: u32)
fn delete_element(&self, index: u32)
Remove an item from the drop-down list.
Sourcefn duplicates(&self, duplicates: bool)
fn duplicates(&self, duplicates: bool)
Prevents duplicate texts from the drop-down list.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".