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

How to get the text input from a tkinter text box?

I've made this converter. I want it to convert decimal values into binary and hexadecimal using Tkinter.. I made a text input box but I don't know how to get the input values from the input box. We aren't supposed to use OOP so we can't use…
2
votes
0 answers

How do I add a placeholder for a tkinter Entry widget?

How do i make a placeholder for a tkinter Entry widget like in the google search bar shown above?
2
votes
0 answers

Writing a function that creates a Tkinter Entry Widget, inserts, and configs that Entry

I am building a Tkinter App that will display 40 entries and my code doesn't look good since I am writing the same 3 lines of code for each Entry. self.entry_0_1 = GameEntry(self.background, relx=0.15, rely=0.185) self.entry_0_1.insert(0,…
whenmoon
  • 21
  • 1
2
votes
0 answers

How to refresh tkinter window if requirements aren't fulfilled when pushing button

So I have a make story button, but I want it to be so if the entry boxes are empty or an adjective is not selected, it refreshes the window and does not make the story(continue on with code). I have tried using self.destory() and self.update(), but…
2
votes
2 answers

Clear Tkinter Entry text - so new text looks new?

I want to modify the code below to clear the Entry text prior to new text being written. Basically I want to delete text, wait one second, then write new text. This should give the appearance of "NEW" text being written. Any ideas? TIA - Brad …
2
votes
2 answers

How to use an Entry widget in a fuction from another function

How can I use an entry.get which is in a function again in another function ? I want to use answer1.get which is in def question1() again in question2()... So I want this: if the users give the right answer to the 1st question then they can see the…
Ozzz
  • 29
  • 5
2
votes
1 answer

Why i can't running the code in the second run?

my code is not error in the first run, but after the second run (not closed the window yet) is error. This is my code: import tkinter as tk from tkinter import * window = tk.Tk() window.state('zoomed') Harga = [] inputH =…
Arkhan
  • 25
  • 4
2
votes
2 answers

How can I set the text of a ttk.Entry?

It appears that I cannot set the text of a ttk.Entry with a root of ttk.Label during an event: import tkinter from tkinter import ttk def modify_label_text(event): entry = event.widget newvalue = entry.get() label = entry.master …
S.S. Anne
  • 15,171
  • 8
  • 38
  • 76
2
votes
1 answer

How to change just one side border width of a ttk.Entry?

I am trying to display a sudoku layout with tkinter grid and ttk entries (maybe, I am not using the right approach to achieve it). I would like to know if the style option of ttk entry has any way to change the border of just one side. I have…
2
votes
1 answer

Tkinter validatecommand command mangles argument type?

I've been trying to do some type checking by in an Entry widget by attaching a handler function that is provided the both the entry and the expected type (a Type class object from the built-in type() function). All works well except it appears the…
2
votes
1 answer

Why are two Entry boxes with the same 'text =' values treated as the same entry box?

I've asked a question about text being inserted into two entry boxes when it should only be inserted into one. The problem lines of code turned out to be these: MoneyAvailableTextBox = Entry(temp, font=('arial', 14, 'bold'), bg='White', fg =…
user14959776
2
votes
2 answers

Is it possible to change the content in canvas.create_text by clicking on it just like in Entry?

Following is my code, from tkinter import * window = Tk() canvas = Canvas(window,width=300, height=300, bd=0) canvas.pack() background = PhotoImage(file="Images/background.png") # can be any background…
2
votes
5 answers

Python local variable 'charcheck' referenced before assignment, why?

I'm trying to write a password validator application using python tkinter. If the inserted password contains at least 2 numbers, at least 2 special characters and a length of at least 7, the password is considered Strong, else Weak. If I enter a…
Liana
  • 314
  • 5
  • 15
2
votes
2 answers

Tkinter changing entry state based on radiobutton

I have four radio buttons. Underneath these four button is an Entry widget. I am trying to make this Entry widget only become available to type into when the last radio button is selected. The gui is in a class, as you can see in the code…
Lucy
  • 21
  • 5
2
votes
0 answers

Tkinter get() from an entry textfield

I have three widgets (shown below) - a label, an entry, and a button. I'm hoping to accept user input of an integer when the button is clicked. I get the following error: ERROR RESOLVED! I was making this too complicated. Success is Mine!!! I…
heather
  • 113
  • 1
  • 12