tkinter
import tkinter as tk
import tkinter.messagebox
from tkinter import Menu, BOTH
from tkinter import ttk
import time
import settings
import mysql_conn as sql
import re
def main():
win = tkinter.Tk()
win.title(“A11_MES”)
sw = win.winfo_screenheight()
sh = win.winfo_screenwidth()
win.geometry("%dx%d+%d+%d" %(1600, 850, (sw-1600)/2, (sh-850)/2))
win.geometry("%dx%d" %(1600, 850))
tab0 = tk.Frame(win)
tab0.pack(expand=1, fill=BOTH)
tab1 = tk.Frame(win)
tab2 = tk.Frame(win)
tab3 = tk.Frame(win)
tab4 = tk.Frame(win)
tk.Label(tab0, text=“登入界面”, bg="#FF62BC").place(relx=0.0, rely=0.5, relwidth=1, relheight=0.1)
tk.Label(tab1, text=“过站系统”, bg="#FF62BC").place(relx=0.0, rely=0.5, relwidth=1, relheight=0.1)
tk.Label(tab2, text=“排产系统”, bg="#FF62BC").place(relx=0.0, rely=0.5, relwidth=1, relheight=0.1)
tk.Label(tab3, text=“工站查询”, bg="#FF62BC").place(relx=0.0, rely=0.5, relwidth=1, relheight=0.1)
tk.Label(tab4, text=“过站明细”, bg="#FF62BC").place(relx=0.0, rely=0.5, relwidth=1, relheight=0.1)
def to_tab1():
tab0.forget()
tab2.forget()
tab3.forget()
tab4.forget()
tab1.pack(expand=1, fill=BOTH)
def to_tab2():
tab0.forget()
tab1.forget()
tab3.forget()
tab4.forget()
tab2.pack(expand=1, fill=BOTH)
def to_tab3():
tab0.forget()
tab1.forget()
tab2.forget()
tab4.forget()
tab3.pack(expand=1, fill=BOTH)
def to_tab4():
tab0.forget()
tab1.forget()
tab2.forget()
tab3.forget()
tab4.pack(expand=1, fill=BOTH)
def bind_F1(self):
to_tab1()
def bind_F2(self):
to_tab2()
def bind_F3(self):
to_tab3()
def bind_F4(self):
to_tab4()
win.bind(’’, bind_F1)
win.bind(’’, bind_F2)
win.bind(’’, bind_F3)
win.bind(’’, bind_F4)
menubar = Menu(win)
win.config(menu=menubar)
menu2 = tkinter.Menu(menubar, tearoff