FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ComboBox

    struct · ferroui-controls · v0.5.0

    struct ComboBox
    

    A drop-down list control.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<ComboBox>
    

    Returns a strong reference to this object.

    Source

    TEMPLATE_PARTS

    const TEMPLATE_PARTS: &'static [TemplatePartAttribute]
    

    The named parts expected in the control template.

    Source

    PSEUDO_CLASSES

    const PSEUDO_CLASSES: PseudoClassesAttribute
    

    The pseudoclasses set by the class.

    Source

    is_drop_down_open_property

    fn is_drop_down_open_property() -> &'static StyledProperty<bool>
    

    Defines the IsDropDownOpen property.

    Source

    is_editable_property

    fn is_editable_property() -> &'static StyledProperty<bool>
    

    Defines the IsEditable property.

    Source

    max_drop_down_height_property

    fn max_drop_down_height_property() -> &'static StyledProperty<f64>
    

    Defines the MaxDropDownHeight property.

    Source

    selection_box_item_property

    fn selection_box_item_property() -> &'static DirectProperty<ComboBox, Option<BoxedValue>>
    

    Defines the SelectionBoxItem property.

    Source

    placeholder_text_property

    fn placeholder_text_property() -> &'static StyledProperty<Option<String>>
    

    Defines the PlaceholderText property.

    Source

    placeholder_foreground_property

    fn placeholder_foreground_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
    

    Defines the PlaceholderForeground property.

    Source

    horizontal_content_alignment_property

    fn horizontal_content_alignment_property() -> &'static StyledProperty<HorizontalAlignment>
    

    Defines the HorizontalContentAlignment property.

    Source

    vertical_content_alignment_property

    fn vertical_content_alignment_property() -> &'static StyledProperty<VerticalAlignment>
    

    Defines the VerticalContentAlignment property.

    Source

    text_property

    fn text_property() -> &'static StyledProperty<Option<String>>
    

    Defines the Text property.

    Source

    selection_box_item_template_property

    fn selection_box_item_template_property() -> &'static StyledProperty<Option<Rc<dyn IDataTemplate>>>
    

    Defines the SelectionBoxItemTemplate property.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see ferroui_base::FerroObject::construct.

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    drop_down_closed

    fn drop_down_closed(self: &Self, handler: impl Fn() -> () + 'static) -> Subscription
    

    Occurs after the drop-down (popup) list of the ComboBox closes.

    Dropping the returned guard removes the handler; Subscription::detach keeps it for the life of the combo box.

    Source

    drop_down_opened

    fn drop_down_opened(self: &Self, handler: impl Fn() -> () + 'static) -> Subscription
    

    Occurs after the drop-down (popup) list of the ComboBox opens.

    Dropping the returned guard removes the handler; Subscription::detach keeps it for the life of the combo box.

    Source

    is_drop_down_open

    fn is_drop_down_open(self: &Self) -> bool
    

    Gets or sets a value indicating whether the dropdown is currently open.

    Source

    set_is_drop_down_open

    fn set_is_drop_down_open(self: &Self, value: bool)
    

    Source

    is_editable

    fn is_editable(self: &Self) -> bool
    

    Gets or sets a value indicating whether the control is editable.

    Source

    set_is_editable

    fn set_is_editable(self: &Self, value: bool)
    

    Source

    max_drop_down_height

    fn max_drop_down_height(self: &Self) -> f64
    

    Gets or sets the maximum height for the dropdown list.

    Source

    set_max_drop_down_height

    fn set_max_drop_down_height(self: &Self, value: f64)
    

    Source

    selection_box_item

    fn selection_box_item(self: &Self) -> Option<BoxedValue>
    

    Gets the item to display as the control's content.

    Source

    set_selection_box_item

    fn set_selection_box_item(self: &Self, value: Option<BoxedValue>)
    

    Sets the item to display as the control's content.

    Source

    placeholder_text

    fn placeholder_text(self: &Self) -> Option<String>
    

    Gets or sets the placeholder text.

    Source

    set_placeholder_text

    fn set_placeholder_text(self: &Self, value: Option<String>)
    

    Source

    placeholder_foreground

    fn placeholder_foreground(self: &Self) -> Option<Rc<dyn IBrush>>
    

    Gets or sets the brush that renders the placeholder text.

    Source

    set_placeholder_foreground

    fn set_placeholder_foreground(self: &Self, value: Option<Rc<dyn IBrush>>)
    

    Source

    horizontal_content_alignment

    fn horizontal_content_alignment(self: &Self) -> HorizontalAlignment
    

    Gets or sets the horizontal alignment of the content within the control.

    Source

    set_horizontal_content_alignment

    fn set_horizontal_content_alignment(self: &Self, value: HorizontalAlignment)
    

    Source

    vertical_content_alignment

    fn vertical_content_alignment(self: &Self) -> VerticalAlignment
    

    Gets or sets the vertical alignment of the content within the control.

    Source

    set_vertical_content_alignment

    fn set_vertical_content_alignment(self: &Self, value: VerticalAlignment)
    

    Source

    selection_box_item_template

    fn selection_box_item_template(self: &Self) -> Option<Rc<dyn IDataTemplate>>
    

    Gets or sets the data template used to display the selected item. This has a higher priority than the item template if set.

    Source

    set_selection_box_item_template

    fn set_selection_box_item_template(self: &Self, value: Option<Rc<dyn IDataTemplate>>)
    

    Source

    text

    fn text(self: &Self) -> Option<String>
    

    Gets or sets the text used when the control is editable. Does nothing if it is not editable.

    Source

    set_text

    fn set_text(self: &Self, value: Option<String>)
    

    Source

    clear

    fn clear(self: &Self)
    

    Clears the selection.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.