Code: Select all
class TestWindow(Frame):
def __init__(self):
# set the title of the window
Frame.__init__(self)
self.pack(expand=YES, fill=BOTH)
self.master.title('Test Custom Input')
# the button that do stuff and close window
Button(
text="Click Me!",
width=25,
height=5,
command=self.conclude
).pack()
def conclude(self):
self.destroy()
Code: Select all
def Do(Environment):
# just show the dialog
Wnd = TestWindow()
App.Do( Environment, 'StartForeignWindow', { 'WindowHandle': int(Wnd.winfo_id()) } )
Wnd.mainloop()
App.Do( Environment, 'StartForeignWindow', { 'WindowHandle': 0 } )
