代码拉取完成,页面将自动刷新
#-*- coding:utf-8 -*-
import os, sys
if sys.version_info[0] == 2:
from Tkinter import *
from tkFont import Font
from ttk import *
#Usage:showinfo/warning/error,askquestion/okcancel/yesno/retrycancel
from tkMessageBox import *
#Usage:f=tkFileDialog.askopenfilename(initialdir='E:/Python')
#import tkFileDialog
#import tkSimpleDialog
else: #Python 3.x
from tkinter import *
from tkinter.font import Font
from tkinter.ttk import *
from tkinter.messagebox import *
#import tkinter.filedialog as tkFileDialog
#import tkinter.simpledialog as tkSimpleDialog #askstring()
class Application_ui(Frame):
#这个类仅实现界面生成功能,具体事件处理代码在子类Application中。
def __init__(self, master=None):
Frame.__init__(self, master)
self.master.title('Form1')
self.master.geometry('389x339')
self.createWidgets()
def createWidgets(self):
self.top = self.winfo_toplevel()
self.style = Style()
self.TabStrip1 = Notebook(self.top)
self.TabStrip1.place(relx=0.062, rely=0.071, relwidth=0.887, relheight=0.876)
self.TabStrip1__Tab1 = Frame(self.TabStrip1)
self.TabStrip1__Tab1Lbl = Label(self.TabStrip1__Tab1, text='我的快玩')
self.TabStrip1__Tab1Lbl.place(relx=0.1,rely=0.5)
self.TabStrip1.add(self.TabStrip1__Tab1, text='我的快玩')
self.TabStrip1__Tab2 = Frame(self.TabStrip1)
self.TabStrip1__Tab2Lbl = Label(self.TabStrip1__Tab2, text='找游戏')
self.TabStrip1__Tab2Lbl.place(relx=0.1,rely=0.5)
self.TabStrip1.add(self.TabStrip1__Tab2, text='找游戏')
class Application(Application_ui):
#这个类实现具体的事件处理回调函数。界面生成代码在Application_ui中。
def __init__(self, master=None):
Application_ui.__init__(self, master)
if __name__ == "__main__":
top = Tk()
Application(top).mainloop()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。