Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

center button in tkinter

import tkinter as tk
root=tk.Tk()
root.geometry("300x275")

B=tk.Button(root,text="button",command= lambda:fun() ,width=5,font=("Arial",14))
B.grid(columnspan=5,row=5,column=2)
B.place(relx=0.5, rely=0.5, anchor='center')

root.mainloop()
 
PREVIOUS NEXT
Tagged: #center #button #tkinter
ADD COMMENT
Topic
Name
7+3 =