Piratz Entry#
Let us try the entry widget. The thinking here is that we have a fairly simple widget, so an image of an old yellowed document may be appropriate. The image has irregular edges, so instead of a smooth expansion I have purposefully chosen border values that create more jagged borders.
If required we could impose an old font such as the equivalent of
"Palace Script MT" in Windows. As with pirate label there was no need to
create a layout, "element create" is all we need.
Show/Hide Code 07pirate_entry.py
# both theme_create and theme_settings worked
style.theme_create( "yummy", parent="clam", settings={
#style.theme_settings('default', {
# start of theme extract
'Entry.field': {"element create":
('image', "entry-n",
('focus', 'entry-f'),
('disabled', 'entry-d'),
{'height': 18,'border':[10,10],'padding':[5,4], 'sticky': 'nsew'})}
# end of theme extract - don't forget to add comma at end when inserting
})
style.theme_use('yummy') # 'default'
sv = StringVar()
widg = Entry(fr,textvariable=sv)
widg.grid(column=0,row=18,padx=5,pady=5 )
sv.set('first')
sv1 = StringVar()
widg1 = Entry(fr,textvariable=sv1)
widg1.grid(column=0,row=19,padx=5,pady=5,sticky='ns')
sv1.set('second really really long')
run_state(fr,widg,widg1)
root.mainloop()