1 Star 0 Fork 2

yubo_725 / AddressBook

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
test.py 1.94 KB
一键复制 编辑 原始数据 按行查看 历史
yubo 提交于 2016-12-30 10:08 . first commit
#-*- 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()
Python
1
https://gitee.com/yubo725/AddressBook.git
git@gitee.com:yubo725/AddressBook.git
yubo725
AddressBook
AddressBook
master

搜索帮助