Questions tagged [tkinter-entry]

Tkinter Entry refers to a type of widget used in Tkinter (a Python standard GUI package), called the Entry widget, used to enter or display a single line of text. Not to be confused with the Text widget which is used to enter multiple lines of text. Use this tag for questions related to the Entry widget.

Tkinter Entry refers to a type of widget used in Tkinter (a Python standard GUI package), called the Entry widget, used to enter or display a single line of text. Not to be confused with the Text widget which is used to enter multiple lines of text. Use this tag for questions related to the Entry widget.

1335 questions
2
votes
1 answer

python: Taking an Tkinter entry value

I've been trying to get an entry value (the S1 in the code) to set itself as a value (STR in the _attributes dictionary), and I just can't get it to work. I want to make this an eventual toploop, but am going a step at a time on this, as I'm new to…
DJ80
  • 43
  • 1
  • 1
  • 8
2
votes
3 answers

clearing an entry widget box

I want to use an entry widget to get a number between 1 and 9. If any other key is pressed I want to remove it from the display. def onKeyPress(event): if event.char in ['1', '2', '3', '4', '5', '6', '7', '8', '9'] ...do…
1
vote
1 answer

python entry widget tuple combo

I've been playing with combining entry widgets with tuples in python 2.7 tkinter. With this code, I should be able to enter the name of a fruit, search for it in the fruit bowl tuple, and if it's in there, display the characteristics of that fruit…
Jeff
  • 161
  • 12
1
vote
1 answer

Specify relative width of two embedded "entries" within "text" widget

I have a problem in specifying Entry widget size on Linux and Windows. These entries were created on Linux: On Linux, they look fine within the Text widget. There are 2 Entry cells one by one, created with this line of code: tk.Entry(master,…
marw
  • 2,939
  • 4
  • 28
  • 37
1
vote
1 answer

Weird interaction of cget() in tkinter.ttk

Been playing out with tkinter until I stumble upon this. Apparently, it seems that the ttk.Entry does not recognize the configured state until the state is printed. My code is as follow: import tkinter as tk from tkinter import ttk def…
1
vote
0 answers

Tkinter GUI entry displaying two different font sizes

I'm working on my first python Tkinter GUI and am getting along quite well. I'm now trying to create an entry with default text displayed with two font sizes. I've managed to get the default text in the entry and even seperate the two parts with two…
JimV
  • 11
  • 3
1
vote
0 answers

tkinter - StringVar set and trace

I seem to misunderstand how trace works for tkinter.StringVar. I want to create a class that inherits from StringVar. One of the reasons is to have a different behavior if the value is changed "programmatically" i.e. using StringVar.set(), or "via…
yassem
  • 41
  • 6
1
vote
2 answers

Configure Entry Text color for only 1 character in Tkinter

I am making a project in which I created a tkinter window, and in it there is an Entry widget. I need to change the color of the following Entry widget. The following is what I did. self.input_entry.config(fg="red") input_entry is the Entry…
1
vote
2 answers

Entry selection list with tkinter

How can I generate a normal selection list (like the "State" field in any HTML form for postal addresses) using Python tkinter? As illustrated below, the Listbox widget displays all the selections in a large box all the time, and if you reduce the…
Dave
  • 3,834
  • 2
  • 29
  • 44
1
vote
1 answer

Tkinter - Change Label Text/Entry on Button Click

I have two labels and entry fields (A & B). When I enter the username/password for "A Username/A Password", I want to click the "Submit" button, then have the labels/entry fields change to "B Username/B Password" and be able to click the "Submit"…
arnpry
  • 1,103
  • 1
  • 10
  • 26
1
vote
1 answer

unable to find attribute using tkinter

i'm having problem with this error, can someone tell me what wrong with my code. im totally new to python coding using tkinter. i can't find what the problem and im trying ti solve it and i cant get any fix on this area. im trying to find where the…
noel
  • 31
  • 5
1
vote
1 answer

How to use Stringvar - Tkinter for multiple entries and tracing those multiple entries

I am trying to build GUI using tkinter for displaying csv file data and trying to add few columns which has manual entries, But I am stuck at how to use StringVar for multiple entries and use trace method to apply changes when user update some…
saurabh
  • 23
  • 6
1
vote
1 answer

All other widgets are affected when one of the widgets move in a GUI (using the tkinter library in python 3)

Whenever I try to move individual widgets or click a button that produces words effectively moving other widgets that had nothing to do those both specified actions above. Here is my code: import tkinter as tk # Create the main window window =…
1
vote
1 answer

How to retrieve user input from Entry using Button Tkinter?

I'm trying to build this small window using Tkinter where people upload a link and it just returns it (the project is more complex but let's simplify). This is the function that just prints the link string: tag_list = [] def…
bsaoptima
  • 125
  • 3
1
vote
1 answer

Tkinter: How do I return the text within an Entry widget to a variable upon a Button press

This is what I tried GUI.py from tkinter import * class Search: def __init__(self, root): self.query = None self.root = root # Create and draw container self.frame = Frame(self.root) self.frame.pack() …