Pre fill Textfield
swoiwode last edited by
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
JonB last edited by
Are you creating your ui's programatically, or with ui editor?
If using the editor, you would do
v=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.