cursive/examples/text_area.rs

19 lines
378 B
Rust
Raw Normal View History

2016-08-02 07:32:16 +00:00
extern crate cursive;
use cursive::Cursive;
use cursive::views::{Dialog, TextArea};
use cursive::traits::*;
2016-08-02 07:32:16 +00:00
fn main() {
let mut siv = Cursive::new();
siv.add_layer(Dialog::new()
2016-08-02 07:32:16 +00:00
.title("Describe your issue")
.padding((1, 1, 1, 0))
.content(TextArea::new()
2017-04-22 04:46:05 +00:00
.with_id("text"))
2016-08-02 07:32:16 +00:00
.button("Ok", Cursive::quit));
siv.run();
}