vstack

Function vstack 

Source
pub fn vstack<VT: ViewTuple + 'static>(children: VT) -> impl View
Expand description

Vertical stack of up to 128 Views in a tuple. Each item can be a different view type.

Examples found in repository?
examples/env.rs (lines 25-28)
24fn main() {
25    rui(vstack((
26        my_control(),
27        my_control().env(MyControlType::Agro),
28    )))
29}
More examples
Hide additional examples
examples/custom_modifier.rs (lines 41-44)
40fn main() {
41    rui(vstack((
42        my_control().padding(Auto),
43        my_control().agro().padding(Auto),
44    )))
45}
examples/todo_list.rs (line 31)
29fn main() {
30    rui(state(std::vec::Vec::new, move |todos, _| {
31        vstack((add_button(todos), todo_list(todos)))
32    }));
33}
examples/basic.rs (lines 4-9)
3fn main() {
4    rui(vstack((
5        "This is a test.",
6        rectangle().flex(),
7        "This is another test.",
8        rectangle().flex(),
9    )));
10}
examples/slider.rs (lines 11-14)
9fn my_slider(s: impl Binding<f32>) -> impl View {
10    with_ref(s, move |v| {
11        vstack((
12            v.to_string().font_size(10).padding(Auto),
13            hslider(s).thumb_color(RED_HIGHLIGHT).padding(Auto),
14        ))
15    })
16}
examples/gallery.rs (lines 43-50)
42fn main() {
43    rui(vstack((
44        "rui widget gallery".padding(10.0),
45        button_example(),
46        slider_example(),
47        knob_example(),
48        toggle_example(),
49        text_editor_example(),
50    ))
51    .padding(Auto)
52    .window_title("rui widget gallery"))
53}