def __init__(self, parent, app=None):
        tk.Frame.__init__(self, parent)
        background = self.cget("background")
        self.app = app
        self.pages = []
        self.nodelist = []
        self.current_page = None

        # within the frame are two panes; the left has a tree,
        # the right shows the current page. We need a splitter
        self.pw = tk.PanedWindow(self, orient="horizontal", background="#f58735", 
                                 borderwidth=1,relief='solid',
                                 sashwidth=3)
        self.pw.pack(side="top", fill="both", expand=True, pady = (4,1), padx=4)
        self.left = tk.Frame(self.pw, background=background, borderwidth=0, highlightthickness=0)
        self.right = tk.Frame(self.pw, background="white", width=600, height=600, borderwidth=0, 
                              highlightthickness=0)
        self.pw.add(self.left)
        self.pw.add(self.right)

        self.list = TabList(self.left)
        vsb = AutoScrollbar(self.left, command=self.list.yview, orient="vertical")
        hsb = AutoScrollbar(self.left, command=self.list.xview, orient="horizontal")
        self.list.configure(xscrollcommand=hsb.set, yscrollcommand=vsb.set)

        self.list.grid(row=0, column=1, sticky="nsew", padx=0, pady=0)
        vsb.grid(row=0, column=0, sticky="ns")
        hsb.grid(row=1, column=1, sticky="ew")
        self.left.grid_rowconfigure(0, weight=1)
        self.left.grid_columnconfigure(1, weight=1)
        self.list.bind("<<ListboxSelect>>", self.on_list_selection)
        # start with them invisible; they will reappear when needed
        vsb.grid_remove()
        hsb.grid_remove()
Exemplo n.º 2
0
    def __init__(self, parent, app=None):
        tk.Frame.__init__(self, parent)
        background = self.cget("background")
        self.app = app
        self.pages = []
        self.nodelist = []
        self.current_page = None

        # within the frame are two panes; the left has a tree,
        # the right shows the current page. We need a splitter
        self.pw = tk.PanedWindow(self,
                                 orient="horizontal",
                                 background="#f58735",
                                 borderwidth=1,
                                 relief='solid',
                                 sashwidth=3)
        self.pw.pack(side="top", fill="both", expand=True, pady=(4, 1), padx=4)
        self.left = tk.Frame(self.pw,
                             background=background,
                             borderwidth=0,
                             highlightthickness=0)
        self.right = tk.Frame(self.pw,
                              background="white",
                              width=600,
                              height=600,
                              borderwidth=0,
                              highlightthickness=0)
        self.pw.add(self.left)
        self.pw.add(self.right)

        self.list = TabList(self.left)
        vsb = AutoScrollbar(self.left,
                            command=self.list.yview,
                            orient="vertical")
        hsb = AutoScrollbar(self.left,
                            command=self.list.xview,
                            orient="horizontal")
        self.list.configure(xscrollcommand=hsb.set, yscrollcommand=vsb.set)

        self.list.grid(row=0, column=1, sticky="nsew", padx=0, pady=0)
        vsb.grid(row=0, column=0, sticky="ns")
        hsb.grid(row=1, column=1, sticky="ew")
        self.left.grid_rowconfigure(0, weight=1)
        self.left.grid_columnconfigure(1, weight=1)
        self.list.bind("<<ListboxSelect>>", self.on_list_selection)
        # start with them invisible; they will reappear when needed
        vsb.grid_remove()
        hsb.grid_remove()