AboutWin есть.. над код перепроверить..
from Tkinter import *
class shell():
# global AboutWin, NickEntry
def __init__(self):
self.root = Tk()
self.root.geometry('590x410')
self.root.title('I Have Come Here :P')
self.root.resizable(False, False) # horizontal=, vertical=
# Окно ввода информации
TextInp = Text(self.root, height=121, width=421, state=NORMAL,
font=('Arial', 9), wrap=WORD)
# Окно вывода информации
TextOut = Text(self.root, height=251, width=421, state=DISABLED,
font=('Arial', 9), wrap=WORD)
# Список подключенных участников
ListUsr = Listbox(self.root, height=251, width=141,
selectmode=SINGLE)
# Поле для ввода никнейма
NickEntry = Entry(self.root, width=141)
InfoLabel = Label (self.root, height=31, width=121,
text=u'Напишите здесь свой\n ник и нажмите Enter.',
font=('Arial', 9), anchor=CENTER)
AboutWin = Toplevel(self.root, height=100, width=200)
AboutLabel = Label(AboutWin, text='This is test.', font=('Arial', 9))
AboutLabel.place(anchor='center')
AboutWin.withdraw()
# Менюшка сверху
TopBar = Menu(self.root)
self.root.config(menu= TopBar)
# File
MenuFile = Menu(TopBar)
MenuFile.add_command(label='Connect to server..', command= self.Connect)
MenuFile.add_command(label='Disconnect..')
MenuFile.add_separator()
MenuFile.add_command(label='Save..') # Ctrl + S (^S)
MenuFile.add_command(label='Clear..')
MenuFile.add_separator()
MenuFile.add_command(label='Exit', command= self.root.destroy) # Ctrl + Q (^Q)
# About
#MenuAbout = Menu(TopBar)
#MenuAbout.add_command(label='test', command= self.About)
TopBar.add_cascade(label='File', menu= MenuFile)
TopBar.add_cascade(label='About', command= self.About)
# Размещение всех виджетов
TextInp.place(x=10, y=270, height=121, width=421)
TextOut.place(x=10, y=10, height=251, width=421)
ListUsr.place(x=440, y=10, height=251, width=141)
NickEntry.place(x=440, y=360, width=141)
InfoLabel.place(x=450, y=320, height=31, width=121)
def run(self):
self.root.mainloop()
def About(self):
self.AboutWin.deiconify()
def Connect(self):
name = self.NickEntry.get()
print name
gui = shell()
gui.run()