gyscos / cursive

A Text User Interface library for the Rust programming language
MIT License
4.26k stars 243 forks source link

[FEATURE] Multiline EditView #769

Closed Cg1340 closed 9 months ago

Cg1340 commented 9 months ago

How to get a multiline editview? I tried using the function fixed_size() but it didn't work.

yuki0iq commented 9 months ago

You can use TextArea. There is also an example which shows how to use it.

EditView was probably designed to be single-line edit control, so if you have to be able to input multiple lines, you may consider using TextArea.

If, however, you want to have a "one line" edit with word wrapping, you can wrap TextArea with OnEventView and silence 'Enter' key and sanitize paste data (but it probably wouldn't be needed).

Cg1340 commented 9 months ago

It worked. Thank you very much.