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

沒有留言:

張貼留言

MQTT WS HMI 與 Wokwi ESP32 連線的資訊透過HiveMQ

MQTT WS HMI 與 Wokwi ESP32 連線的資訊透過HiveMQ     https://console.hivemq.cloud/clusters 當您進入 HiveMQ Cloud Console 的 Clusters 頁面時,您的目標是取得能讓 MQTT W...