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

An option in the question dialog to hide the input #487

Closed
Usernames-Are-Not-Available opened this issue Nov 5, 2023 · 1 comment
Closed

Comments

@Usernames-Are-Not-Available

An issue I've had with the question dialog is that there's never been an option to hide the input - i.e. only showing a certain character instead of the actual input - for the dialog. Yet that feature is available on the standard textbox widget.

An alternative for users who need this kind of feature - to, for example, hide a password inputted into a question dialog - would be to create another window with a textbox configured to hide its input, and a pushbutton to return the textbox's value. I've done this before - it's a very drawn-out method of doing a task that could be quite easily implemented.

My solution for this would be going into the files, finding what is called when you start a question dialog, and editing the passable arguments to allow for a user to hide the input of the dialog, and then testing to see if it works without changing the Tk code.

I think that it should be relatively easy to implement - maybe taking the best part of a day, maybe less, to complete (including tests) - and if I can implement it on my copy of guizero, I'd like to open a pull request and see if you all are fine with the changes.

Anyway, just comment on this if you think it'd be a nice to have feature, and if it gets approval, I'll start working on it.

@martinohanlon
Copy link
Collaborator

guizero uses the tkinter simpledialog for the question popup.

simpledialog does not support masking (i.e. hiding the input).

My recommendation (as you suggest) would be to create a function which uses the standard guizero components, Window, TestBox, PushButton to create a dialog which is specific for your needs.

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

No branches or pull requests

2 participants