Answers for "text input tkinter"

5

tkinter input text box

from tkinter import *


textBox = Entry(text="Placeholder text")
Posted by: Guest on June-11-2021
0

tkinter input box

import tkinter as tk

root= tk.Tk()

canvas1 = tk.Canvas(root, width = 400, height = 300)
canvas1.pack()

entry1 = tk.Entry (root) 
canvas1.create_window(200, 140, window=entry1)

def getSquareRoot ():  
    x1 = entry1.get()
    
    label1 = tk.Label(root, text= float(x1)**0.5)
    canvas1.create_window(200, 230, window=label1)
    
button1 = tk.Button(text='Get the Square Root', command=getSquareRoot)
canvas1.create_window(200, 180, window=button1)

root.mainloop()
Posted by: Guest on July-09-2021
0

text input tkinter

e = Entry(<Widget>, width=50, borderwidth=5)
e.pack()
Posted by: Guest on April-01-2021

Python Answers by Framework

Browse Popular Code Answers by Language