pub struct TextArea(/* private fields */);Expand description
Text over many lines: the platform’s text area, whose lines wrap to its
width and where Return starts a new line. It’s as tall as
lines of the platform’s text, and scrolls past them.
Implementations§
Source§impl TextArea
impl TextArea
Sourcepub fn placeholder(self, placeholder: impl IntoValue<String>) -> TextArea
pub fn placeholder(self, placeholder: impl IntoValue<String>) -> TextArea
Shown while it’s empty, where the platform’s text areas show one (Qt, WinUI); AppKit’s and GTK’s have none. It still names the area to assistive technology without a label.
pub fn enabled(self, enabled: impl IntoValue<bool>) -> TextArea
Sourcepub fn read_only(self, read_only: impl IntoValue<bool>) -> TextArea
pub fn read_only(self, read_only: impl IntoValue<bool>) -> TextArea
Shows the text, which can still be selected, copied and focused, but not edited. Unlike a disabled area, it looks and reads as usual.
Sourcepub fn lines(self, lines: impl IntoValue<u32>) -> TextArea
pub fn lines(self, lines: impl IntoValue<u32>) -> TextArea
How many lines of text tall it is at its natural size: 3 unless set, and at least 1. The layout can still stretch or shrink it.
Sourcepub fn line_wrap(self, wrap: impl IntoValue<bool>) -> TextArea
pub fn line_wrap(self, wrap: impl IntoValue<bool>) -> TextArea
Whether its lines wrap to its width, as they do unless it’s set false. Without, each line is as long as its text, and the area scrolls sideways: for code, or logs.
Trait Implementations§
Source§impl ElementBuilder for TextArea
impl ElementBuilder for TextArea
fn element(&mut self) -> &mut Element
Source§fn style(self, f: impl FnOnce(&mut Style)) -> Self
fn style(self, f: impl FnOnce(&mut Style)) -> Self
Source§fn style_with(self, f: impl Fn(&mut Style) + 'static) -> Self
fn style_with(self, f: impl Fn(&mut Style) + 'static) -> Self
f re-runs whenever the
signals it reads change, and must set every field it cares about.fn width(self, value: impl IntoValue<Length>) -> Self
fn height(self, value: impl IntoValue<Length>) -> Self
fn min_width(self, value: impl IntoValue<Length>) -> Self
fn min_height(self, value: impl IntoValue<Length>) -> Self
fn max_width(self, value: impl IntoValue<Length>) -> Self
fn max_height(self, value: impl IntoValue<Length>) -> Self
fn aspect_ratio(self, value: impl IntoValue<f32>) -> Self
fn padding(self, value: impl IntoValue<Length>) -> Self
fn padding_x(self, value: impl IntoValue<Length>) -> Self
fn padding_y(self, value: impl IntoValue<Length>) -> Self
fn padding_start(self, value: impl IntoValue<Length>) -> Self
fn padding_end(self, value: impl IntoValue<Length>) -> Self
fn padding_top(self, value: impl IntoValue<Length>) -> Self
fn padding_bottom(self, value: impl IntoValue<Length>) -> Self
fn margin(self, value: impl IntoValue<Length>) -> Self
fn margin_x(self, value: impl IntoValue<Length>) -> Self
fn margin_y(self, value: impl IntoValue<Length>) -> Self
fn margin_start(self, value: impl IntoValue<Length>) -> Self
fn margin_end(self, value: impl IntoValue<Length>) -> Self
fn margin_top(self, value: impl IntoValue<Length>) -> Self
fn margin_bottom(self, value: impl IntoValue<Length>) -> Self
fn grow(self, value: impl IntoValue<f32>) -> Self
fn shrink(self, value: impl IntoValue<f32>) -> Self
fn basis(self, value: impl IntoValue<Length>) -> Self
fn align_self(self, value: impl IntoValue<Align>) -> Self
Source§fn justify_self(self, value: impl IntoValue<Align>) -> Self
fn justify_self(self, value: impl IntoValue<Align>) -> Self
Source§fn top(self, value: impl IntoValue<Length>) -> Self
fn top(self, value: impl IntoValue<Length>) -> Self
absolute()).fn bottom(self, value: impl IntoValue<Length>) -> Self
Source§fn start(self, value: impl IntoValue<Length>) -> Self
fn start(self, value: impl IntoValue<Length>) -> Self
fn end(self, value: impl IntoValue<Length>) -> Self
fn grid_column(self, value: impl IntoValue<GridPlacement>) -> Self
fn grid_row(self, value: impl IntoValue<GridPlacement>) -> Self
fn direction(self, value: impl IntoValue<TextDirection>) -> Self
display the node had.fn size( self, width: impl IntoValue<Length>, height: impl IntoValue<Length>, ) -> Self
Source§fn tooltip(self, text: impl IntoValue<String>) -> Self
fn tooltip(self, text: impl IntoValue<String>) -> Self
entries, and built again whenever what it
reads changes, as Menu::children_with builds its entries.