def invalidInventoryPopup(self, msg, *mainFuncs):
"""
Creates a popupwindow and binds the button to multiple functions
:param msg: Text message displayed in the popupwindow
:type msg: str
:param mainFuncs: List of functions to be run when the user clicks OK
"""
window = Tk()
window.wm_title('Invalid Inventory File')
message = ttk.Label(window, text=msg)
message.grid(row=0, column=0, columnspan=2, pady=10, padx=10, sticky=tkinter.N + tkinter.S)
okButton = ttk.Button(window, text="OK", command=lambda: self.combine_funcs(window.destroy(), window.quit()))
okButton.grid(row=1, column=1, sticky=tkinter.N + tkinter.S)
window.mainloop()
评论列表
文章目录