Open kivattt opened 4 days ago
So you would like to see partial words in the placeholder text? I wonder what the rationale is for that. Consider this example:
"Would you like some ass" ("...istance?")
I'm not sure that this would be good for the user.
Maybe you can explain why you'd want this?
In my project using tview, I have an InputField with SetFieldWidth(45), with some placeholder text. I noticed when the second word in the placeholder was long enough, it would suddenly disappear and show only the first word!
This code demonstrates the issue:
InputField uses a TextArea to draw the placeholder https://github.com/rivo/tview/blob/c38c796625fb04d2e677f0e737e42b079a8731ca/inputfield.go#L475
Which uses a TextView with word-wrapping enabled by default https://github.com/rivo/tview/blob/c38c796625fb04d2e677f0e737e42b079a8731ca/textarea.go#L1325-L1326
If this is intended behaviour, it would be nice to have something like
.SetWrap()
or.SetWordWrap()
as part of InputField