2017年10月10日 星期二

tkinter button height and width



import sys
from tkinter import *
import  tkinter.font as tkFont
#main menu
def mmWindow():
    mmWindow=Tk()
    mmWindow.geometry('300x300')
    mmWindow.title('Button Create Windows')

#first window   
root= Tk()
helv36 = tkFont.Font(family = "Helvetica",size = 36,weight = "bold")

root.geometry('640x480+0+0')
root.title('DMX512 Controller')

wtitle = Label (root, text = "Pi DMX", font=helv36, fg = 'blue')
wtitle.place(x = 320, y = 50)
wtitle.pack()

#main menu button
mmbutton = Button (root, text = "Main Menu", font=helv36,fg='green', bg='black',command = mmWindow)
mmbutton.place( x=100, y = 100)
mmbutton.config(width=50, height=20)
mmbutton.pack()

root.mainloop()

沒有留言:

張貼留言

2024年4月24日 星期三 Node-Red Dashboard UI Template + AngularJS 參考 AngularJS教學 --2

 2024年4月24日 星期三 Node-Red Dashboard UI Template + AngularJS 參考 AngularJS教學 --2 AngularJS 實例 <!DOCTYPE html> <html> <head> &...