gui programming iii this can be used with buttonscanvasesetc and it can be used with any of their propertieslike bgfgstateetc as shortcuttkinter overrides the [operatorsso that label['text'accomplishes the same thing as the example above message boxes message boxes are windows that pop up to ask you question or say something and then go away to use themwe need an import statementfrom tkinter messagebox import there are variety of different types of message boxes for each of them you can specify the message the user will see as well as the title of the message box here are three types of message boxesfollowed by the code that generates themshowinfo(title'message for you 'message'hi there'askquestion(title'quit'message'do you really want to quit'showwarning(title'warning 'message'unsupported format 'below is list of all the types of message boxes each displays message in its own way message box special properties showinfo ok button askokcancel ok and cancel buttons askquestion yes and no buttons askretrycancel retry and cancel buttons askyesnocancel yesnoand cancel buttons showerror an error icon and an ok button showwarning warning icon and an ok button each of these functions returns value indicating what the user clicked see the next section for simple example of using the return value here is table of the return values