pub struct Column { /* private fields */ }Expand description
Specifies the properties of a column, like its width range.
Implementations§
source§impl Column
impl Column
sourcepub fn auto() -> Self
pub fn auto() -> Self
Automatically sized based on content.
If you have many thousands of rows and are therefore using TableBody::rows
or TableBody::heterogeneous_rows, then the automatic size will only be based
on the currently visible rows.
sourcepub fn auto_with_initial_suggestion(suggested_width: f32) -> Self
pub fn auto_with_initial_suggestion(suggested_width: f32) -> Self
Automatically sized.
The given fallback is a loose suggestion, that may be used to wrap cell contents, if they contain a wrapping layout. In most cases though, the given value is ignored.
sourcepub fn remainder() -> Self
pub fn remainder() -> Self
Take all the space remaining after the other columns have been sized.
If you have multiple Column::remainder they all
share the remaining space equally.
sourcepub fn resizable(self, resizable: bool) -> Self
pub fn resizable(self, resizable: bool) -> Self
Can this column be resized by dragging the column separator?
If you don’t call this, the fallback value of
TableBuilder::resizable is used (which by default is false).
sourcepub fn clip(self, clip: bool) -> Self
pub fn clip(self, clip: bool) -> Self
If true: Allow the column to shrink enough to clip the contents.
If false: The column will always be wide enough to contain all its content.
Clipping can make sense if you expect a column to contain a lot of things,
and you don’t want it too take up too much space.
If you turn on clipping you should also consider calling Self::at_least.
Default: false.
sourcepub fn at_least(self, minimum: f32) -> Self
pub fn at_least(self, minimum: f32) -> Self
Won’t shrink below this width (in points).
Default: 0.0
sourcepub fn at_most(self, maximum: f32) -> Self
pub fn at_most(self, maximum: f32) -> Self
Won’t grow above this width (in points).
Default: f32::INFINITY
sourcepub fn range(self, range: impl Into<Rangef>) -> Self
pub fn range(self, range: impl Into<Rangef>) -> Self
Allowed range of movement (in points), if in a resizable Table.
sourcepub fn auto_size_this_frame(self, auto_size_this_frame: bool) -> Self
pub fn auto_size_this_frame(self, auto_size_this_frame: bool) -> Self
If set, the column will be automatically sized based on the content this frame.
Do not set this every frame, just on a specific action.
Trait Implementations§
impl Copy for Column
impl StructuralPartialEq for Column
Auto Trait Implementations§
impl Freeze for Column
impl RefUnwindSafe for Column
impl Send for Column
impl Sync for Column
impl Unpin for Column
impl UnwindSafe for Column
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more