DropDown

代表下拉菜单的小部件,允许用户从列表中选择项目。

A widget representing a dropdown menu, allowing users to select an item from a list.

Props

decoratenametypedescription
animatoranimatorAnimatorHandles the animations for the dropdown menu.
redraw, livedraw_bgDrawQuadDefines the background drawing properties of the dropdown menu.
livedraw_textDrawLabelTextDefines the text drawing properties of the dropdown menu.
walkwalkWalkDefines how the dropdown menu should be positioned and sized within its parent.
livebindStringBinding property for the dropdown menu.
livebind_enumStringEnum binding property for the dropdown menu.
livepopup_menuOption<LivePtr>Pointer to the popup menu.
livelabelsVec<String>List of labels to display in the dropdown menu.
livevaluesVec<LiveValue>List of values associated with the labels in the dropdown menu.
livepopup_menu_positionPopupMenuPositionPosition of the popup menu relative to the dropdown (OnSelected or BelowInput).
rustis_openboolIndicates whether the dropdown menu is open.
liveselected_itemusizeIndex of the selected item in the dropdown menu.
layoutlayoutLayoutDefines the layout of the dropdown menu.

See Layout

See DrawLabelText

See DrawQuad

See Walk

See PopupMenuPosition

Event

namedescription
Select(usize, LiveValue)Triggered when an item is selected in the dropdown menu.
None