pub struct Table { /* private fields */ }Expand description
A table widget for displaying rows and columns
Implementations§
Source§impl Table
impl Table
Sourcepub fn header_style(self, fg: Color, bg: Option<Color>) -> Self
pub fn header_style(self, fg: Color, bg: Option<Color>) -> Self
Set header colors
Sourcepub fn selected_style(self, fg: Color, bg: Color) -> Self
pub fn selected_style(self, fg: Color, bg: Color) -> Self
Set selected row colors
Sourcepub fn virtual_scroll(self, enabled: bool) -> Self
pub fn virtual_scroll(self, enabled: bool) -> Self
Enable virtual scrolling for large datasets
Sourcepub fn overscan(self, rows: usize) -> Self
pub fn overscan(self, rows: usize) -> Self
Set overscan rows (extra rows rendered above/below viewport)
Sourcepub fn show_scrollbar(self, show: bool) -> Self
pub fn show_scrollbar(self, show: bool) -> Self
Show/hide scrollbar when virtual scrolling
Sourcepub fn selected_index(&self) -> usize
pub fn selected_index(&self) -> usize
Get selected index
Sourcepub fn select_next(&mut self)
pub fn select_next(&mut self)
Select next row (no wrap)
Sourcepub fn select_prev(&mut self)
pub fn select_prev(&mut self)
Select previous row (no wrap)
Sourcepub fn select_first(&mut self)
pub fn select_first(&mut self)
Select first row
Sourcepub fn select_last(&mut self)
pub fn select_last(&mut self)
Select last row
Trait Implementations§
Source§impl StyledView for Table
impl StyledView for Table
Source§fn remove_class(&mut self, class: &str)
fn remove_class(&mut self, class: &str)
Remove a CSS class
Source§fn toggle_class(&mut self, class: &str)
fn toggle_class(&mut self, class: &str)
Toggle a CSS class
Auto Trait Implementations§
impl !Freeze for Table
impl !RefUnwindSafe for Table
impl Send for Table
impl !Sync for Table
impl Unpin for Table
impl UnsafeUnpin for Table
impl UnwindSafe for Table
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more