(self, parent, title, contents, modal=True, wrap=WORD,
                 *, _htest=False, _utest=False)
Show the given text in a scrollable window with a 'close' button.

        If modal is left True, users cannot interact with other windows
        until the textview window is closed.

        parent - parent of this dialog
        title - string which is title of popup dialog
        contents - text to display in dialog
        wrap - type of text wrapping to use ('word', 'char' or 'none')
        _htest - bool; change box location when running htest.
        _utest - bool; don't wait_window when running unittest.
Show the given text in a scrollable window with a 'close' button.
Show the given text in a scrollable window with a close button .
def __init__(self, parent, title, contents, modal=True, wrap=WORD,
                 *, _htest=False, _utest=False):
        """Show the given text in a scrollable window with a 'close' button.

        If modal is left True, users cannot interact with other windows
        until the textview window is closed.

        parent - parent of this dialog
        title - string which is title of popup dialog
        contents - text to display in dialog
        wrap - type of text wrapping to use ('word', 'char' or 'none')
        _htest - bool; change box location when running htest.
        _utest - bool; don't wait_window when running unittest.
        """
        super().__init__(parent)
        self['borderwidth'] = 5
        # Place dialog below parent if running htest.
        x = parent.winfo_rootx() + 10
        y = parent.winfo_rooty() + (10 if not _htest else 100)
        self.geometry(f'=750x500+{x}+{y}')

        self.title(title)
        self.viewframe = ViewFrame(self, contents, wrap=wrap)
        self.protocol("WM_DELETE_WINDOW", self.ok)
        self.button_ok = button_ok = Button(self, text='Close',
                                            command=self.ok, takefocus=False)
        self.viewframe.pack(side='top', expand=True, fill='both')

        self.is_modal = modal
        if self.is_modal:
            self.transient(parent)
            self.grab_set()
            if not _utest:
                self.wait_window()
def __init__ ( self , parent , title , contents , modal = True , wrap = WORD , * , _htest = False , _utest = False ) : super ( ) . __init__ ( parent ) self [ 'borderwidth' ] = 5 # Place dialog below parent if running htest. x = parent . winfo_rootx ( ) + 10 y = parent . winfo_rooty ( ) + ( 10 if not _htest else 100 ) self . geometry ( f'=750x500+{x}+{y}' ) self . title ( title ) self . viewframe = ViewFrame ( self , contents , wrap = wrap ) self . protocol ( "WM_DELETE_WINDOW" , self . ok ) self . button_ok = button_ok = Button ( self , text = 'Close' , command = self . ok , takefocus = False ) self . viewframe . pack ( side = 'top' , expand = True , fill = 'both' ) self . is_modal = modal if self . is_modal : self . transient ( parent ) self . grab_set ( ) if not _utest : self . wait_window ( )