Exemplo n.º 1
0
 def make_widgets(self):
     Hello(self).pack(side=RIGHT)
     Button(self, text='Attach', command=self.quit).pack(side=LEFT)
Exemplo n.º 2
0
 def makeWidgets(self):
     Hello(self).pack(side=RIGHT)  # attach a Hello to me
     Button(self, text='Attach', command=self.quit).pack(side=LEFT)
Exemplo n.º 3
0
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)
Exemplo n.º 5
0
 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)
Exemplo n.º 6
0
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()
Exemplo n.º 7
0
		def make_widgets(self):
				Hello.make_widgets(self)
				Button(self,text='extend',command=self.quit).pack(side=RIGHT)
Exemplo n.º 8
0
 def makeWidgets(self):
     Hello(self).pack(side=RIGHT)  # прикрепить объект класса Hello к себе
     Button(self, text='Attach', command = self.quit).pack(side=LEFT)
Exemplo n.º 9
0
    def make_widgets(self):
        Hello.make_widgets(self)

        Button(self, text='Extend',
               command=lambda x=self: Hello.quit(x)).pack(side=RIGHT)
Exemplo n.º 10
0
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()
Exemplo n.º 11
0
 def create_widgets(self):
     Hello(master=self).pack(side=RIGHT)
     Button(master=self, text='Attach', command=self.quit).pack(side=LEFT)
Exemplo n.º 12
0
 def __init__(self, parent=None):
     Hello.__init__(self, parent)
     Button(self, text='Extend', command=self.quit).pack(side=RIGHT)
Exemplo n.º 13
0
 def make_widgets(self):  # extend method here
     '''
     Makes the widgets
     '''
     Hello.make_widgets(self)
     Button(self, text='Extend', command=self.quit).pack(side=RIGHT)
Exemplo n.º 14
0
 def make_widgets(self):  # расширение метода
     Hello.make_widgets(self)
     Button(self, text='Extend', command=self.quit).pack(side=RIGHT)
Exemplo n.º 15
0
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()
Exemplo n.º 16
0
 def make_widgets(self):  # extend method here
     Hello.make_widgets(self)
     Button(self, text="Extend", command=self.quit).pack(side=RIGHT)
Exemplo n.º 17
0
 def make_widgets(self):
     Hello.make_widgets(self)
     Button(self, text='Extend', command=self.quit).pack(side=RIGHT)
Exemplo n.º 18
0
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()