Search
 
SCRIPT & CODE EXAMPLE
 

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()
Comment

center buttons tkinter

button.place(relx=0.5, rely=0.5, anchor=CENTER)
Comment

PREVIOUS NEXT
Code Example
Python :: choice random word in python from a text file 
Python :: degree symbol in python 
Python :: os.system return value 
Python :: difference between w+ and r+ in python 
Python :: python open encoding utf-8 
Python :: selenium python get innerhtml 
Python :: return count of unique values pandas 
Python :: python program to keep your computer awake 
Python :: python play sound 
Python :: pandas filter string contain 
Python :: python create new pandas dataframe with specific columns 
Python :: python youtube downloader mp3 
Python :: show image in python 
Python :: verificar se arquivo existe python 
Python :: create dict from json file python 
Python :: python show interpreter path 
Python :: numpy read image 
Python :: plt.plot width line 
Python :: wait until clickable selenium python 
Python :: pygame draw line 
Python :: pytest --clrear cache 
Python :: run celery on windows 
Python :: how to get the current position of mouse on screen using python 
Python :: remove r and n from string python 
Python :: python execute string 
Python :: load custom font pygame 
Python :: html to json python 
Python :: how to calculate running time in python 
Python :: save numpy array to csv 
Python :: python seaborn lmplot add title 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =