pub struct Block<'a> { /* private fields */ }
Expand description
Base widget to be used with all upper level ones. It may be used to display a box border around the widget and/or add a title.
Examples
Block::default()
.title("Block")
.title_style(Style::default().fg(Color::Red))
.borders(Borders::LEFT | Borders::RIGHT)
.border_style(Style::default().fg(Color::White))
.style(Style::default().bg(Color::Black));
Implementations§
Trait Implementations§
source§impl<'a> Widget for Block<'a>
impl<'a> Widget for Block<'a>
source§fn draw(&mut self, area: Rect, buf: &mut Buffer)
fn draw(&mut self, area: Rect, buf: &mut Buffer)
Draws the current state of the widget in the given buffer. That the only method required to
implement a custom widget. Read more