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.

26 lines
814 B

import tkinter as tk
from tkinter import messagebox
class MainPage:
def __init__(self, master):
self.root = master
self.page = tk.Frame(self.root)
self.page.pack()
self.root.geometry('600x400')
self.create_page()
def create_page(self):
# 创建一个标签用于展示简单的家居信息标题
self.home_info_title = tk.Label(self.page, text="主页面区", font=("Helvetica", 16))
self.home_info_title.pack(pady=20)
# 创建一个按钮,点击后显示更详细的家居信息
self.view_details_button = tk.Button(self.page, text="家居信息", command=self.view_home_details)
self.view_details_button.pack(pady=10)
if __name__ == '__main__':
root = tk.Tk()
app = MainPage(root)
root.mainloop()