def make_widgets(self): Hello(self).pack(side=RIGHT) Button(self, text='Attach', command=self.quit).pack(side=LEFT)
def makeWidgets(self): Hello(self).pack(side=RIGHT) # attach a Hello to me Button(self, text='Attach', command=self.quit).pack(side=LEFT)
from sys import exit from tkinter import * from gui6 import Hello parent = Frame(None) parent.pack() Hello(parent).pack(side=RIGHT) Button(parent, text='Attach', command=exit).pack(side=LEFT) parent.mainloop()
def make_widgets(self): # extend method here Hello.make_widgets(self) # ejecutamos el metodo original make_widgets para crear el boton hello Button(self, text='Extend', command=self.quit).pack(side=RIGHT)
def make_widgets(self): # extend method here Hello.make_widgets( self ) # ejecutamos el metodo original make_widgets para crear el boton hello Button(self, text='Extend', command=self.quit).pack(side=RIGHT)
from sys import exit from tkinter import * from gui6 import Hello parent = Frame(None) # 生成一个容器组件 parent.pack() Hello(parent).pack(side=RIGHT) # 附加Hello,而不运行 Button(parent, text='Attach', command=exit).pack(side=LEFT) parent.mainloop()
def make_widgets(self): Hello.make_widgets(self) Button(self,text='extend',command=self.quit).pack(side=RIGHT)
def makeWidgets(self): Hello(self).pack(side=RIGHT) # прикрепить объект класса Hello к себе Button(self, text='Attach', command = self.quit).pack(side=LEFT)
def make_widgets(self): Hello.make_widgets(self) Button(self, text='Extend', command=lambda x=self: Hello.quit(x)).pack(side=RIGHT)
from sys import exit from tkinter import * from gui6 import Hello parent = Frame(master=None) parent.pack() Hello(master=parent).pack(side=RIGHT) Button(master=parent, text='Attach', command=exit).pack(side=LEFT) parent.mainloop()
def create_widgets(self): Hello(master=self).pack(side=RIGHT) Button(master=self, text='Attach', command=self.quit).pack(side=LEFT)
def __init__(self, parent=None): Hello.__init__(self, parent) Button(self, text='Extend', command=self.quit).pack(side=RIGHT)
def make_widgets(self): # extend method here ''' Makes the widgets ''' Hello.make_widgets(self) Button(self, text='Extend', command=self.quit).pack(side=RIGHT)
def make_widgets(self): # расширение метода Hello.make_widgets(self) Button(self, text='Extend', command=self.quit).pack(side=RIGHT)
from sys import exit from Tkinter import * # get Tk widget classes from gui6 import Hello # get the subframe class parent = Frame(None) # make a container widget parent.pack() Hello(parent).pack(side=RIGHT) # attach Hello instead of running it Button(parent, text='Attach', command=exit).pack(side=LEFT) parent.mainloop()
def make_widgets(self): # extend method here Hello.make_widgets(self) Button(self, text="Extend", command=self.quit).pack(side=RIGHT)
def make_widgets(self): Hello.make_widgets(self) Button(self, text='Extend', command=self.quit).pack(side=RIGHT)
from sys import exit from tkinter import * # импортировать классы виджетов Tk from gui6 import Hello # импортировать подкласс фрейма parent = Frame(None) # создать контейнерный виджет parent.pack() Hello(parent).pack(side=RIGHT) # прикрепить виджет Hello, не запуская его Button(parent, text='Attach', command=exit).pack(side=LEFT) parent.mainloop()