-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TextArea component #127
Comments
Getting a good text area control done depends on truetype font metrics, which is difficult for multiple reasons. It is in progress, but not done. In the meantime, what I've done when I need something like this is restrict myself to the monosopace font (which is part of the Scenic drivers). Then you can choose when to break a line simply by watching the character count. You will probably want some level of manual control over line breaks and such anyway for that style of app. Any Text Area control would e aimed at the minimal scenario. Let me know if you want more guidance than that. |
Thanks for the help, is it possible on the text input component to set a fixed height while not affecting the cursor height? I added a text input and set the height but it also made the cursor the same height |
fyi... I'm working on an experimental Font metrics package. Will help to unblock this... |
Font Metrics is in master. |
interested in this component as well. I've noticed the current Input.TextField component does not support newline characters. |
Am planning this for v0.11. Supporting newline is one thing (definitely yes), but I'd like feedback on the rest. Is select/replace important? Copy/paste? double-tap word to select it? Text input is one of those areas that goes deep fast. To keep the level of work involved realistic, I'd like to find the set of features that provides what we actually need, but also lets me roll out the full set later. |
Being able to support newlines is one thing, but doing selection/copy/paste/etc. is a whole thing, especially if the desire is to support clipboard operations outside of the application. I'd suggest starting with just the simple input and newline support and scrolling or whatever until we have an idea what to do with those more advanced features. |
I actually worked a system out for the clipboard access on osx and windows with a few little changes, my biggest hurdle at current for our project is select-able/highlight-able text. I was considering the following method: Thoughts Boyd? |
@fantypants Maybe a dedicated highlight function in the text area to take a scroll offset and mouse position to find the starting glyph (via metrics) and then on mouseup the same information to find ending glyph. This feels like something that might want to be done mathematically to be performant. |
I think that only simplest features should be supported. Highlight (applying styles on specific graphemes range), copy and paste should be supported in multiple components/primitives. I would like to see a much more generic solution in such cases. For example somebody would like to write a find tool for categorized settings in order to find specific option. Ability to highlight (just apply custom style) only specific text (i.e. not full text primitive) would be really important. For me select/replace is not that important - it could be later enhanced in this library or even in other helper library. What we would need is to easy work on them to not make it too complicated. I don't even see context menu required here. I believe that with
With that we can write our own find/replace components without any problem. I have one good example here: I would like to put text into In short I would like to see:
Something like:
|
Hey guys. Yeah. this whole topic is hard, mostly becuase (as you correctly pointed out) the click-drag selection thing is a bunch of work. Related to it, There also needs to be a better system for control focus. This will be especially important when implementing a virtual keyboard. So these issues end up being inter-related. This is why it still isn't done. Requires some serious experimentation and thought... |
Looking to create a simple notepad app but didn't see a text area. Does this exist or is it possible somehow to get a large text input?
The text was updated successfully, but these errors were encountered: