hello/hello.rs
1use rungui::*;
2
3fn main() {
4 let app = App::new("hello").expect("init");
5 let win = Window::new("Hello, rungui");
6 let col = VBox::new(win);
7 let label = Label::new(col, "Hello, wörld! こんにちは");
8 let name = TextInput::new(col);
9 name.set_placeholder("Your name");
10 let button = Button::new(col, "Greet");
11 button.on_click(move || label.set_text(&format!("Hello, {}!", name.text())));
12 win.show();
13 app.run();
14}