summaryrefslogtreecommitdiffstats
path: root/widget
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--widget/src/text_editor.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/widget/src/text_editor.rs b/widget/src/text_editor.rs
index e0102656..0029bc87 100644
--- a/widget/src/text_editor.rs
+++ b/widget/src/text_editor.rs
@@ -109,6 +109,12 @@ where
self
}
+ /// Sets the width of the [`TextEditor`].
+ pub fn width(mut self, width: impl Into<Length>) -> Self {
+ self.width = width.into();
+ self
+ }
+
/// Sets the message that should be produced when some action is performed in
/// the [`TextEditor`].
///