You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.
Basically I'd like to be able to highlight text in an entry without modifying it.
One use for this (my use) is a MUD client where you want to highlight the input text (automatically) to be able to erase it all with a single backspace (as an alternative to automatically clearing the text for the player).
The text was updated successfully, but these errors were encountered:
Hm, the first thing that comes to my mind is that Entry.Draw would have to somehow intelligently assign style names to part of the text. Not sure how you would specify the text to be highlighted, maybe something like entry.SetStyleNameRange("misspelled", 5, 3), where 5 is the offset from where the highlight should start and 3 is how many characters should be highlighted.
@marcusolsson that could work however my title for this issue is a bit of a misnomer as what we're talking about is less about highlighting and more about selecting the text; so that it can all be erased with a single backspace instead of having to backspace through the complete text.
In that sense it's more than just a style issue...
IngCr3at1on
changed the title
Proposal: text entry highlight functionality
Proposal: text entry highlight/select functionality
Jan 5, 2018
Selection is definitely on the roadmap. Both using mouse and programmatically, to define ranges. I don't have any specific solution in mind but here are some thoughts:
Selection would have to be specified in "content space" as opposed to view space where word wrap would have to be taken into account.
Ideally, both non-editable text (Label) and editable text (RuneBuf) would support selection.
@marcusolsson aye makes sense except I still think selection and highlighting go hand-in-hand so "content-space" wouldn't really work entirely; after-all you want to be able to tell that you selected text (by highlighting it in some way) that's going to effects view space.
Basically I'd like to be able to highlight text in an entry without modifying it.
One use for this (my use) is a MUD client where you want to highlight the input text (automatically) to be able to erase it all with a single backspace (as an alternative to automatically clearing the text for the player).
The text was updated successfully, but these errors were encountered: