You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
877 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import tkinter as tk
from tkinter import messagebox
from JJXX import create_main_window
def create_main_page(root):
# 创建主页面元素
home_info_title = tk.Label(root, text="主页面区", font=("Helvetica", 16))
home_info_title.pack(pady=20)
# 创建并绑定按钮点击事件,用于显示家居信息
goto_jiaju_button = tk.Button(root, text="家居信息", command=lambda: JiaJuInfoPage(root))
goto_jiaju_button.pack(pady=10)
def JiaJuInfoPage(master):
# 直接在这里创建家居信息页面,而不是通过类实例化
# 注意此处简化处理未完全实现JiaJuPage逻辑仅为示例
create_main_window()
# 根据实际情况调整窗口大小或其他UI元素
def a():
root = tk.Tk()
root.geometry('600x400')
create_main_page(root)
root.mainloop()
if __name__ == '__main__':
a()