Splitter

Splitter小部件允许将容器划分为水平或垂直两个可调整大小的面板。它提供了拖动分界线以动态调整两个面板大小的能力。

The Splitter widget allows the division of a container into two resizable panels, either horizontally or vertically. It provides the ability to drag the dividing line to adjust the sizes of the two panels dynamically.

Props

decoratenametypedescription
liveaxisSplitterAxisDefines the direction of the split: horizontal or vertical.
livealignSplitterAlignSpecifies the initial alignment or weight of the splitter.
rustrectRectStores the rectangle area of the splitter.
rustpositionf64Holds the current position of the splitter.
rustdrag_start_alignOption<SplitterAlign>Tracks the alignment during the drag operation.
rustarea_aAreaDefines the area of the first panel.
rustarea_bAreaDefines the area of the second panel.
animatoranimatorAnimatorManages animations for the splitter.
livemin_verticalf64Minimum size for vertical splitting.
livemax_verticalf64Maximum size for vertical splitting.
livemin_horizontalf64Minimum size for horizontal splitting.
livemax_horizontalf64Maximum size for horizontal splitting.
redraw livedraw_splitterDrawSplitterHandles the drawing of the splitter.
livesplit_bar_sizef64Width of the splitter bar.
rustdraw_stateDrawStateWrap<DrawState>Tracks the drawing state of the splitter.
find liveaWidgetRefReference to the first widget.
find livebWidgetRefReference to the second widget.
walkwalkWalkDefines the layout and positioning of the splitter.

See SplitterAxis

See SplitterAlign

See Walk

See WidgetRef


Event

No specific events associated with this widget.