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

Text Entry #50

Open
ShaunKulesa opened this issue Jul 19, 2021 · 8 comments
Open

Text Entry #50

ShaunKulesa opened this issue Jul 19, 2021 · 8 comments

Comments

@ShaunKulesa
Copy link

It says on the docs main description there should be a text entry, where is it?

@kalekundert
Copy link
Contributor

It's called the Form widget. You can find a brief example here and the API documentation (which is admittedly pretty incomplete) here.

@ShaunKulesa
Copy link
Author

Ahh i see thanks. Is there a way to update its position?

@ShaunKulesa
Copy link
Author

Never mind figured it out.

@kalekundert
Copy link
Contributor

Glad you figured it out. Let me know if you have any other questions.

@ShaunKulesa
Copy link
Author

Last little issue, when I call form.get_text() it says self._layout is None.
File "C:\Users\Home\AppData\Local\Programs\Python\Python39-32\lib\site-packages\glooey\text.py", line 518, in get_text
return self._label.text
File "C:\Users\Home\AppData\Local\Programs\Python\Python39-32\lib\site-packages\glooey\text.py", line 162, in get_text
return self._layout.document.text
AttributeError: 'NoneType' object has no attribute 'document'

@kalekundert
Copy link
Contributor

Hmm, I'm not sure what this issue is off hand. Did you attach the form to the GUI before calling get_text()? If not, that could be the problem. Otherwise, if you can post post a minimal working example, I can take a look at it (probably later, though).

@kalekundert kalekundert reopened this Jul 19, 2021
@ShaunKulesa
Copy link
Author

Ahh yes it was because I did it before adding it to gui. Thank you for this Entry/Form. Pyglets one wasn't capable of the things i needed for my engines gui.

@ShaunKulesa
Copy link
Author

Probably the last question, how do I get the text when I press enter? I see it already unfocused when I press enter

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

2 participants