-
-
Notifications
You must be signed in to change notification settings - Fork 588
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
Controlling position of cursor in InputField #892
Comments
I am not sure what you are exactly looking for here. Currently there are zero exported functions to directly change the cursors position within a text field. While it is not a major problem. There are ways around it. However, your example seems to show that the If you really need to make it seem like those characters are there, then I would just make the text field's placeholder text Method One (simplest, most consistent, requires editing
|
Thanks @digitallyserviced , would it be unreasonable to request that |
It is not up to me unfortunately. Many PRs sit unattended for new/convenience features. It would be up to @rivo This is why we end up with things like this... https://github.com/rivo/tview/compare/master...digitallyserviced:tview:digitally?expand=1 |
I'm planning on replacing the This can take some time though. It's quite possible that one of the forks will have this before this repo does. |
in case @rivo feels frisky... if he doesn't feel frisky... # for just this addition... (overkill to redirect to repo for just one patch)
go mod edit -replace github.com/rivo/tview=github.com/digitallyserviced/tview@input-field-cursor-pos
# for future edits and your own local version... (you will inevitably end up doing to tview because reasons)
cd YOURPROJECTDIR
mkdir pkgs
git clone https://github.com/rivo/tview pkgs/tview
cd pkgs/tview
git remote add digipatch https://github.com/digitallyserviced/tview
git pull digipatch input-field-cursor-pos
cd ../..
go mod edit -replace github.com/rivo/tview=YOURPROJECTDIR/pkgs/tview
go get
go mod vendor |
Consider:
how can I change the position of the cursor so that when I start typing it types right in the middle of the string (where X is) ?
The text was updated successfully, but these errors were encountered: