cursive/examples/text_area.rs
Alexandre Bury 8fa704bcfa Rename Dialog::new -> Dialog::around
And `Dialog::empty` -> `Dialog::new`
2016-10-02 15:15:30 -07:00

20 lines
411 B
Rust

extern crate cursive;
use cursive::Cursive;
use cursive::views::{Dialog, TextArea};
use cursive::traits::*;
fn main() {
let mut siv = Cursive::new();
siv.add_layer(Dialog::new()
.title("Describe your issue")
.padding((1, 1, 1, 0))
.content(TextArea::new()
.with_id("text")
.fixed_size((30, 5)))
.button("Ok", Cursive::quit));
siv.run();
}