You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
	
	
		
			19 lines
		
	
	
		
			553 B
		
	
	
	
		
			Python
		
	
		
		
			
		
	
	
			19 lines
		
	
	
		
			553 B
		
	
	
	
		
			Python
		
	
|   
											1 month ago
										 | import tkinter as tk | ||
|  | from tkinter import ttk, messagebox | ||
|  | 
 | ||
|  | 
 | ||
|  | class BasePage(ttk.Frame): | ||
|  |     def __init__(self, parent, tcp_client, title): | ||
|  |         super().__init__(parent) | ||
|  |         self.tcp_client = tcp_client | ||
|  |         self.title = title | ||
|  |         self.create_widgets() | ||
|  | 
 | ||
|  |     def create_widgets(self): | ||
|  |         ttk.Label(self, text=self.title, font=('Arial', 14)).pack(pady=10) | ||
|  | 
 | ||
|  |     def show_error(self, message): | ||
|  |         messagebox.showerror("错误", message) | ||
|  | 
 | ||
|  |     def show_info(self, message): | ||
|  |         messagebox.showinfo("信息", message) |