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.
Pre fill Textfield
-
Porting over code from a Tinker desktop application. To improve the user experience I am used to populating input field values with those last entered at last runtime. Something that was part of the Palm programming standard, using preferences. So I think I need to understand how to 'see' a Textfield and set the text value with <variable name>.set(parser.get(<key>,<token>) before it is display, or just afterward. With Tinker this was done with <variable name> = tk.StringVar(). As a side note, I'd like to get the InputText = sender.superview['InputText'] outside of the Button def too. Thanks, Scott
-
Are you creating your ui's programatically, or with ui editor?
If using the editor, you would dov=load_view('myview') v['textfield1'].text = sometext
where textfield1 is replaced with whatever you named your textfield. If you have multiple layers of views, you will need to address each level, e.g.
v['textframe']['textfield1']