(self)
Create browser tkinter widgets, including the tree.
Create browser tkinter widgets, including the tree.
Create browser tkinter widgets including the tree .
def init(self):
        "Create browser tkinter widgets, including the tree."
        global file_open
        root = self.master
        flist = (pyshell.flist if not (self._htest or self._utest)
                 else pyshell.PyShellFileList(root))
        file_open = flist.open
        pyclbr._modules.clear()

        # create top
        self.top = top = ListedToplevel(root)
        top.protocol("WM_DELETE_WINDOW", self.close)
        top.bind("<Escape>", self.close)
        if self._htest: # place dialog below parent if running htest
            top.geometry("+%d+%d" %
                (root.winfo_rootx(), root.winfo_rooty() + 200))
        self.settitle()
        top.focus_set()

        # create scrolled canvas
        theme = idleConf.CurrentTheme()
        background = idleConf.GetHighlight(theme, 'normal')['background']
        sc = ScrolledCanvas(top, bg=background, highlightthickness=0,
                            takefocus=1)
        sc.frame.pack(expand=1, fill="both")
        item = self.rootnode()
        self.node = node = TreeNode(sc.canvas, None, item)
        if not self._utest:
            node.update()
            node.expand()
def init ( self ) : global file_open root = self . master flist = ( pyshell . flist if not ( self . _htest or self . _utest ) else pyshell . PyShellFileList ( root ) ) file_open = flist . open pyclbr . _modules . clear ( ) # create top self . top = top = ListedToplevel ( root ) top . protocol ( "WM_DELETE_WINDOW" , self . close ) top . bind ( "<Escape>" , self . close ) if self . _htest : # place dialog below parent if running htest top . geometry ( "+%d+%d" % ( root . winfo_rootx ( ) , root . winfo_rooty ( ) + 200 ) ) self . settitle ( ) top . focus_set ( ) # create scrolled canvas theme = idleConf . CurrentTheme ( ) background = idleConf . GetHighlight ( theme , 'normal' ) [ 'background' ] sc = ScrolledCanvas ( top , bg = background , highlightthickness = 0 , takefocus = 1 ) sc . frame . pack ( expand = 1 , fill = "both" ) item = self . rootnode ( ) self . node = node = TreeNode ( sc . canvas , None , item ) if not self . _utest : node . update ( ) node . expand ( )