+ 1

Tkinter get() help

How do I get the entry in a textbox of a user

28th May 2019, 1:18 PM
Joseph Ojo
Joseph Ojo - avatar
3 Antworten
+ 1
ᴍᴏᴅᴜs ᴛᴏʟʟᴇɴs I'm talking about textbox widget e = Text ()
31st May 2019, 3:53 PM
Joseph Ojo
Joseph Ojo - avatar
0
Maybe I don't understand, but i just want to help: s is user text, e is Entry widget and L - Label widget. Predefined. The function is called by the button. def btn(): s = e.get() L["text"] = str(s)
28th May 2019, 5:39 PM
ᴍᴏᴅᴜs ᴛᴏʟʟᴇɴs
ᴍᴏᴅᴜs ᴛᴏʟʟᴇɴs - avatar
0
Oh ok. sent is variable for user text, tx - textbox widget. def btn(): sent = tx.get('0.0', END) sent = str(sent)
31st May 2019, 4:04 PM
ᴍᴏᴅᴜs ᴛᴏʟʟᴇɴs
ᴍᴏᴅᴜs ᴛᴏʟʟᴇɴs - avatar