def ask(): popup = Toplevel() # form in modal mode vars = makeform(popup, fields) Button(popup, text='OK', command=(lambda: show(vars, popup))).pack() popup.grab_set() popup.focus_set() popup.wait_window() # wait for destroy here
def ask(): popup = Toplevel() vars = makeform(popup, fields) Button(popup, text='OK', command=(lambda: show(vars, popup))).pack() popup.grab_set() popup.focus_set() popup.wait_window()
def ask(): popup=Toplevel() vars=makeform(popup,fields) Button(popup,text='OK',command=(lambda:show(vars,popup))).pack() popup.grab_set() popup.focus_set popup.wait_window()
def ask(): popup = Toplevel() # show form in modal dialog window vars = makeform(popup, fields) Button(popup, text='OK', command=(lambda: show(vars, popup))).pack() popup.grab_set() popup.focus_set() popup.wait_window() # wait for destroy here
def ask(): popup = Toplevel() # отображение формы в модальном диалоге vars = makeform(popup, fields) Button(popup, text='OK', command=(lambda: show(vars, popup))).pack() popup.grab_set() popup.focus_set() popup.wait_window() # ждать уничтожения окна
def ask(): global popup popup = Toplevel() # show form in modal dialog window vars = makeform(popup, fields) Button(popup, text='OK', command=(lambda v=vars: show(v)) ).pack() popup.grab_set() popup.focus_set() popup.wait_window() # wait for destroy here
def ask(): ''' Creates the dialog and shows it as modal ''' popup = Toplevel() # show form in modal dialog window vars_ = makeform(popup, FIELDS) Button(popup, text='OK', command=(lambda: show(vars_, popup))).pack() popup.grab_set() popup.focus_set() popup.wait_window() # wait for destroy here