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

Add Preview/Handle structure similar to WPF for filtering TextBox input #1680

Closed
profexorgeek opened this issue Jan 27, 2025 · 2 comments
Closed
Assignees
Labels
enhancement New feature

Comments

@profexorgeek
Copy link
Collaborator

This discussion started due to a crash in TerraScriber when the user enters non-numeric characters into a "map size" Textbox, causing the app to crash.

While this issue is a custom code problem and fixable, it triggered a discussion on built-in filtering capabilities. WPF has a system with the concept of Preview and Handle events that allow developers to react to text as it's being entered, filter it, and note that it has been handled.

Forms should implement something similar that offers this flexibility without being opinionated or enumerating every type of filter that users might want.

@profexorgeek
Copy link
Collaborator Author

@vchelaru
Copy link
Owner

This was already implemented, but it was not working for pasted text so I fixed that here:

vchelaru/Gum@0ac7b95

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

No branches or pull requests

2 participants