Skip to content
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

widget.Entry.InsertText #3445

Open
2 tasks done
matwachich opened this issue Dec 1, 2022 · 2 comments
Open
2 tasks done

widget.Entry.InsertText #3445

matwachich opened this issue Dec 1, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@matwachich
Copy link
Contributor

Checklist

  • I have searched the issue tracker for open issues that relate to the same feature, before opening a new one.
  • This issue only relates to a single feature. I will open new issues for any other features.

Is your feature request related to a problem?

A method that will insert text at current caret position to an Entry widget. If some text is selected, it will replace it.

Is it possible to construct a solution with the existing API?

Yes, but it's complicated: you must get the current text, get the caret position (col,row) and convert this to a position in the text stream (no simple method to do this, especialy in multiline Entry), insert the text, then set the text.

Describe the solution you'd like to see.

widget.Entry.InsertText(text string)

@andydotxyz andydotxyz added the enhancement New feature or request label Dec 1, 2022
@andydotxyz andydotxyz added this to the Dalwhinnie (early 2023) milestone Dec 1, 2022
@andydotxyz
Copy link
Member

Nice idea

@matwachich
Copy link
Contributor Author

A workaround I found is feed the clipboard with the text I want to insert, then call Past shortcut on the Entry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants