Closed Usernames-Are-Not-Available closed 11 months ago
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.
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.