Answers for "python tkinte"

5

tkinter

from tkinter import * # import tkinter

window = Tk() #create a window

window.mainloop() #update window
Posted by: Guest on June-27-2021
2

tkinter

from tkinter import *
from tkinter import ttk
root=Tk()
entry1=Entry(root,cursor="fleur",insertbackground="red")
entry1.pack()
Button(root,text="Get cursor type and colour", command=lambda: print(entry1['cursor'],entry1['insertbackground'])).pack()
root.mainloop()
Posted by: Guest on July-24-2021

Python Answers by Framework

Browse Popular Code Answers by Language