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

Single line input dialog and Return key #13

Closed
KenT2 opened this issue Oct 22, 2015 · 6 comments
Closed

Single line input dialog and Return key #13

KenT2 opened this issue Oct 22, 2015 · 6 comments

Comments

@KenT2
Copy link
Contributor

KenT2 commented Oct 22, 2015

When InputDialog is a single line the Return Key adds a second line of text and the first line disappears.

@KenT2
Copy link
Contributor Author

KenT2 commented Nov 15, 2015

#48 does not solve this well where the TextInput is in a Generic Dialog and an Enter callback is not required on every field as it is the Dialog. It can be fudged by adding a dummy on_enter_listener to every TextInput field :-(

@dddomodossola
Copy link
Collaborator

Hi Ken, I think it could not be managed differently in the GenericDialog. I though that, on the textInputs that requires, you can set the on_enter_listener in order to accept the dialog.

@dddomodossola
Copy link
Collaborator

Now the InputDialog accepts the ENTER key as confirmation action.

@KenT2
Copy link
Contributor Author

KenT2 commented Nov 16, 2015

OK for InputDialog

In the GenericDialog situation there might be a number of single line TextInput fields the content of which are dependent on one another, so there is a validation function attached to the OK button which checks the dependencies. Pressing enter on each individual field should by default do nothing and, if it is single line, the return should no be placed in the field as the text then disappears. The optional on_enter listener could be used to do a validity check on an individual field but should not close the dialog

@fohnad
Copy link

fohnad commented Mar 13, 2016

Hello I am dealing with this problem now. Can TextInput be a single line? I use it like this:
txt = gui.TextInput(True, width='80%', height='20px')
but this way if I press Enter then it skips to another line and it is not single line anymore.

I would like to be able to have just one line input and after I change more of different textinputs than press some confirmation button.

dddomodossola added a commit that referenced this issue Oct 11, 2016
@dddomodossola
Copy link
Collaborator

Late, but it's done.

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

No branches or pull requests

3 participants