Struct egui_extras::Column
source · 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