You need to do two things: keep a reference to the widget, and then use the get()
method to get the string.
Here’s an example:
self.entry = Entry(...)
...
print("the text is", self.entry.get())
More Related Contents:
- Why is Tkinter Entry’s get function returning nothing?
- Print the result obtained from an external window but without opening the window (the selected checkboxes are automatically saved in the database)
- Use variable outside its function
- Switch between two frames in tkinter?
- How to pass arguments to a Button command in Tkinter?
- How to access variables from different classes in tkinter?
- Freezing/Hanging tkinter GUI in waiting for the thread to complete
- How to change the color of certain words in the tkinter text widget?
- How to set the text/value/content of an `Entry` widget using a button in tkinter
- How do I bind the enter key to a function in tkinter?
- How to get tkinter canvas to dynamically resize to window width?
- Create a main loop with tkinter?
- Tkinter grid_forget is clearing the frame
- filedialog, tkinter and opening files
- Removing the TK icon on a Tkinter window
- python tkinter return value from function used in command
- Tkinter: How to get frame in canvas window to expand to the size of the canvas?
- Find position of another anchor than the anchor already used
- Tkinter window says (not responding) but code is running
- Tkinter IntVar returning PY_VAR0 instead of value
- Updating OptionMenu from List
- How do I change the background of a Frame in Tkinter?
- Why isn’t .ico file defined when setting window’s icon?
- Why does Python installed via Homebrew not include Tkinter
- tkinter program compiles with cx_Freeze but program will not launch
- Trying to fix tkinter GUI freeze-ups (using threads)
- How do I get the Entry’s value in tkinter?
- Why do Tkinter’s Radio Buttons all Start Selected When Using StringVar but not IntVar?
- How do I resize buttons in pixels? (Tkinter)
- How to keep tkinter button on same row as label and entry box