pub fn rectangle() -> Rectangle
Expand description
Renders a rectangle which expands to fill available space.
Examples found in repository?
More examples
examples/action.rs (line 7)
5 6 7 8 9 10 11 12 13 14 15 16
fn main() {
rui(vstack((
rectangle()
.tap(|_| {
println!("rect tapped");
MyAction {}
})
.padding(Auto),
text("tap the rectangle to send an action"),
))
.handle(|_, _: &MyAction| println!("action received")));
}
Additional examples can be found in: