# TextBoxProps

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-view/generated/builders/trait-textboxprops/

**trait** · [`ferroui-view`](/docs/0.5.0/api/ferroui-view/) · v0.5.0

```rust
trait TextBoxProps: ElementBuilder
```

The properties and routed events of `TextBox`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8454)

## Members

- [`is_inactive_selection_highlight_enabled`](#function-is_inactive_selection_highlight_enabled)
- [`clear_selection_on_lost_focus`](#function-clear_selection_on_lost_focus)
- [`accepts_return`](#function-accepts_return)
- [`accepts_tab`](#function-accepts_tab)
- [`caret_index`](#function-caret_index)
- [`is_read_only`](#function-is_read_only)
- [`password_char`](#function-password_char)
- [`selection_brush`](#function-selection_brush)
- [`selection_foreground_brush`](#function-selection_foreground_brush)
- [`caret_brush`](#function-caret_brush)
- [`caret_blink_interval`](#function-caret_blink_interval)
- [`selection_start`](#function-selection_start)
- [`selection_end`](#function-selection_end)
- [`max_length`](#function-max_length)
- [`max_lines`](#function-max_lines)
- [`min_lines`](#function-min_lines)
- [`text`](#function-text)
- [`text_alignment`](#function-text_alignment)
- [`horizontal_content_alignment`](#function-horizontal_content_alignment)
- [`vertical_content_alignment`](#function-vertical_content_alignment)
- [`text_wrapping`](#function-text_wrapping)
- [`line_height`](#function-line_height)
- [`placeholder_text`](#function-placeholder_text)
- [`use_floating_placeholder`](#function-use_floating_placeholder)
- [`placeholder_foreground`](#function-placeholder_foreground)
- [`new_line`](#function-new_line)
- [`inner_left_content`](#function-inner_left_content)
- [`inner_right_content`](#function-inner_right_content)
- [`reveal_password`](#function-reveal_password)
- [`is_undo_enabled`](#function-is_undo_enabled)
- [`undo_limit`](#function-undo_limit)
- [`on_copying_to_clipboard`](#function-on_copying_to_clipboard)
- [`on_cutting_to_clipboard`](#function-on_cutting_to_clipboard)
- [`on_pasting_from_clipboard`](#function-on_pasting_from_clipboard)
- [`on_text_changed`](#function-on_text_changed)
- [`on_text_changing`](#function-on_text_changing)

<a id="function-is_inactive_selection_highlight_enabled"></a>

### is_inactive_selection_highlight_enabled

```rust
fn is_inactive_selection_highlight_enabled<M>(self: Self, value: impl IntoProp<bool, M>) -> Self
```

Sets `TextBox::is_inactive_selection_highlight_enabled_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8456)

<a id="function-clear_selection_on_lost_focus"></a>

### clear_selection_on_lost_focus

```rust
fn clear_selection_on_lost_focus<M>(self: Self, value: impl IntoProp<bool, M>) -> Self
```

Sets `TextBox::clear_selection_on_lost_focus_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8461)

<a id="function-accepts_return"></a>

### accepts_return

```rust
fn accepts_return<M>(self: Self, value: impl IntoProp<bool, M>) -> Self
```

Sets `TextBox::accepts_return_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8466)

<a id="function-accepts_tab"></a>

### accepts_tab

```rust
fn accepts_tab<M>(self: Self, value: impl IntoProp<bool, M>) -> Self
```

Sets `TextBox::accepts_tab_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8471)

<a id="function-caret_index"></a>

### caret_index

```rust
fn caret_index<M>(self: Self, value: impl IntoProp<i32, M>) -> Self
```

Sets `TextBox::caret_index_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8476)

<a id="function-is_read_only"></a>

### is_read_only

```rust
fn is_read_only<M>(self: Self, value: impl IntoProp<bool, M>) -> Self
```

Sets `TextBox::is_read_only_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8481)

<a id="function-password_char"></a>

### password_char

```rust
fn password_char<M>(self: Self, value: impl IntoProp<char, M>) -> Self
```

Sets `TextBox::password_char_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8486)

<a id="function-selection_brush"></a>

### selection_brush

```rust
fn selection_brush<M>(self: Self, value: impl IntoProp<Option<std::rc::Rc<dyn ferroui_base::media::IBrush>>, M>) -> Self
```

Sets `TextBox::selection_brush_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8491)

<a id="function-selection_foreground_brush"></a>

### selection_foreground_brush

```rust
fn selection_foreground_brush<M>(self: Self, value: impl IntoProp<Option<std::rc::Rc<dyn ferroui_base::media::IBrush>>, M>) -> Self
```

Sets `TextBox::selection_foreground_brush_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8496)

<a id="function-caret_brush"></a>

### caret_brush

```rust
fn caret_brush<M>(self: Self, value: impl IntoProp<Option<std::rc::Rc<dyn ferroui_base::media::IBrush>>, M>) -> Self
```

Sets `TextBox::caret_brush_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8501)

<a id="function-caret_blink_interval"></a>

### caret_blink_interval

```rust
fn caret_blink_interval<M>(self: Self, value: impl IntoProp<std::time::Duration, M>) -> Self
```

Sets `TextBox::caret_blink_interval_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8506)

<a id="function-selection_start"></a>

### selection_start

```rust
fn selection_start<M>(self: Self, value: impl IntoProp<i32, M>) -> Self
```

Sets `TextBox::selection_start_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8511)

<a id="function-selection_end"></a>

### selection_end

```rust
fn selection_end<M>(self: Self, value: impl IntoProp<i32, M>) -> Self
```

Sets `TextBox::selection_end_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8516)

<a id="function-max_length"></a>

### max_length

```rust
fn max_length<M>(self: Self, value: impl IntoProp<i32, M>) -> Self
```

Sets `TextBox::max_length_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8521)

<a id="function-max_lines"></a>

### max_lines

```rust
fn max_lines<M>(self: Self, value: impl IntoProp<i32, M>) -> Self
```

Sets `TextBox::max_lines_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8526)

<a id="function-min_lines"></a>

### min_lines

```rust
fn min_lines<M>(self: Self, value: impl IntoProp<i32, M>) -> Self
```

Sets `TextBox::min_lines_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8531)

<a id="function-text"></a>

### text

```rust
fn text<M>(self: Self, value: impl IntoProp<Option<String>, M>) -> Self
```

Sets `TextBox::text_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8536)

<a id="function-text_alignment"></a>

### text_alignment

```rust
fn text_alignment<M>(self: Self, value: impl IntoProp<ferroui_base::media::TextAlignment, M>) -> Self
```

Sets `TextBox::text_alignment_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8541)

<a id="function-horizontal_content_alignment"></a>

### horizontal_content_alignment

```rust
fn horizontal_content_alignment<M>(self: Self, value: impl IntoProp<ferroui_base::layout::HorizontalAlignment, M>) -> Self
```

Sets `TextBox::horizontal_content_alignment_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8546)

<a id="function-vertical_content_alignment"></a>

### vertical_content_alignment

```rust
fn vertical_content_alignment<M>(self: Self, value: impl IntoProp<ferroui_base::layout::VerticalAlignment, M>) -> Self
```

Sets `TextBox::vertical_content_alignment_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8551)

<a id="function-text_wrapping"></a>

### text_wrapping

```rust
fn text_wrapping<M>(self: Self, value: impl IntoProp<ferroui_base::media::TextWrapping, M>) -> Self
```

Sets `TextBox::text_wrapping_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8556)

<a id="function-line_height"></a>

### line_height

```rust
fn line_height<M>(self: Self, value: impl IntoProp<f64, M>) -> Self
```

Sets `TextBox::line_height_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8561)

<a id="function-placeholder_text"></a>

### placeholder_text

```rust
fn placeholder_text<M>(self: Self, value: impl IntoProp<Option<String>, M>) -> Self
```

Sets `TextBox::placeholder_text_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8566)

<a id="function-use_floating_placeholder"></a>

### use_floating_placeholder

```rust
fn use_floating_placeholder<M>(self: Self, value: impl IntoProp<bool, M>) -> Self
```

Sets `TextBox::use_floating_placeholder_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8571)

<a id="function-placeholder_foreground"></a>

### placeholder_foreground

```rust
fn placeholder_foreground<M>(self: Self, value: impl IntoProp<Option<std::rc::Rc<dyn ferroui_base::media::IBrush>>, M>) -> Self
```

Sets `TextBox::placeholder_foreground_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8576)

<a id="function-new_line"></a>

### new_line

```rust
fn new_line<M>(self: Self, value: impl IntoProp<String, M>) -> Self
```

Sets `TextBox::new_line_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8581)

<a id="function-inner_left_content"></a>

### inner_left_content

```rust
fn inner_left_content<M>(self: Self, value: impl IntoProp<Option<ferroui_base::BoxedValue>, M>) -> Self
```

Sets `TextBox::inner_left_content_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8586)

<a id="function-inner_right_content"></a>

### inner_right_content

```rust
fn inner_right_content<M>(self: Self, value: impl IntoProp<Option<ferroui_base::BoxedValue>, M>) -> Self
```

Sets `TextBox::inner_right_content_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8591)

<a id="function-reveal_password"></a>

### reveal_password

```rust
fn reveal_password<M>(self: Self, value: impl IntoProp<bool, M>) -> Self
```

Sets `TextBox::reveal_password_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8596)

<a id="function-is_undo_enabled"></a>

### is_undo_enabled

```rust
fn is_undo_enabled<M>(self: Self, value: impl IntoProp<bool, M>) -> Self
```

Sets `TextBox::is_undo_enabled_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8601)

<a id="function-undo_limit"></a>

### undo_limit

```rust
fn undo_limit<M>(self: Self, value: impl IntoProp<i32, M>) -> Self
```

Sets `TextBox::undo_limit_property`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8606)

<a id="function-on_copying_to_clipboard"></a>

### on_copying_to_clipboard

```rust
fn on_copying_to_clipboard(self: Self, handler: impl Fn(&ferroui_base::interactivity::RoutedEventArgs) -> () + 'static) -> Self
```

Handles `TextBox::copying_to_clipboard_event`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8611)

<a id="function-on_cutting_to_clipboard"></a>

### on_cutting_to_clipboard

```rust
fn on_cutting_to_clipboard(self: Self, handler: impl Fn(&ferroui_base::interactivity::RoutedEventArgs) -> () + 'static) -> Self
```

Handles `TextBox::cutting_to_clipboard_event`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8616)

<a id="function-on_pasting_from_clipboard"></a>

### on_pasting_from_clipboard

```rust
fn on_pasting_from_clipboard(self: Self, handler: impl Fn(&ferroui_base::interactivity::RoutedEventArgs) -> () + 'static) -> Self
```

Handles `TextBox::pasting_from_clipboard_event`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8621)

<a id="function-on_text_changed"></a>

### on_text_changed

```rust
fn on_text_changed(self: Self, handler: impl Fn(&ferroui_controls::TextChangedEventArgs) -> () + 'static) -> Self
```

Handles `TextBox::text_changed_event`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8626)

<a id="function-on_text_changing"></a>

### on_text_changing

```rust
fn on_text_changing(self: Self, handler: impl Fn(&ferroui_controls::TextChangingEventArgs) -> () + 'static) -> Self
```

Handles `TextBox::text_changing_event`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/generated/builders.rs#L8631)

## Trait implementations

- [`TextBoxProps`](/docs/0.5.0/api/ferroui-view/generated/builders/trait-textboxprops/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
