Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
very basic ui designer question
-
I'm playing with using the ui designer for the first time, and am confused. I'm trying to create a view with a few labels and textfields, and would like to read the values of a couple of textfields, do something with them, and display the result in another. The documentation says that I should be able to set the action from the attribute menu in the designer tool. But there doesn't seem to be that ability.
How can you set the actions for the controls that are created in the designer tool?
Thanks
-
You can set actions for buttons, maybe a few others. Textfields, etc, while they do have actions, or delegates, you can't set them in the ui designer.
What you will find is, since actions and delegates have to basically be globals In order to be used in the designer, it is somewhat limiting, so people end up just setting all of that after you load your view.
-
Thanks! Two additional questions, then:
-
Are there any examples of scripts using textfields you could point me to, to see how it's done?
-
Is there any way to actually look at the code that the UI designer generates, and to modify it directly, as text?
I'm new here, so I apologize if I've violated recommended practice by including new questions in an existing thread. I'm just trying to come out of the 1980's, and to add some rudimentary UI beyond the console to my code...
Thanks in advance for any help!
-
-
-
Check out the
UI Tutorial
examples in the UI section of Pythonista Tools. It is a great way to learn the ui module and there are great tips and tricks there. You can submit pull requests if you have ideas for improving that content. -
Check out the three .pyui tools at https://github.com/cclauss/Ten-lines-or-less
-
-
Fantastic! Thanks! It works...