def body(self, bodyFrame): bodyFrame.config() bodyFrame.columnconfigure(0, weight=1) bodyFrame.rowconfigure(0, weight=1) bodyFrame.columnconfigure(1, weight=1) # Create items frame itemsFrame = tk.Frame(bodyFrame, bg='white') itemsFrame.grid(row=0, column=0, padx=5, pady=5, sticky='news') itemsFrame.columnconfigure(0, weight=1) itemsFrame.rowconfigure(0, weight=1) itemsTree = BoundTree(itemsFrame, self.provider) itemsTree.grid(row=0, column=0, padx=5, pady=5, sticky='news') itemsTree.itemClick = self._itemSelected # Create preview frame previewFrame = tk.Frame(bodyFrame) previewFrame.grid(row=0, column=1, padx=5, pady=5) self._beforePreview() self._createPreview(previewFrame) # Create controls frame controlsFrame = tk.Frame(bodyFrame) controlsFrame.grid(row=1, column=1, padx=5, pady=5, sticky='news') self._createControls(controlsFrame) self._itemSelected(self.firstItem) itemsTree.selectChildByIndex(0) # Select the first item
def body(self, bodyFrame): bodyFrame.config() bodyFrame.columnconfigure(0, weight=1) bodyFrame.columnconfigure(1, weight=1) bodyFrame.columnconfigure(2, weight=1) # Create explanation label self.expText = ExplanationText(bodyFrame) self.expText.text.grid(row=0, column=0, columnspan=2, padx=5, pady=5, sticky='news') # Create items frame itemsFrame = tk.Frame(bodyFrame, bg=pw.TK_GRAY_DEFAULT) itemsFrame.grid(row=1, column=0, padx=5, sticky='news') itemsFrame.columnconfigure(0, weight=1) itemsFrame.rowconfigure(0, weight=1) itemsTree = BoundTree(itemsFrame, self.provider) itemsTree.grid(row=0, column=0, padx=5, pady=5, sticky='news') itemsTree.itemClick = self._itemSelected # Create preview frame previewFrame = tk.Frame(bodyFrame, bg=pw.TK_GRAY_DEFAULT) previewFrame.grid(row=1, column=1, padx=5, pady=5) self._beforePreview() self._createPreview(previewFrame) # Create controls frame controlsFrame = tk.Frame(bodyFrame) controlsFrame.grid(row=2, column=0, columnspan=2, padx=5, pady=5, sticky='sew') controlsFrame.columnconfigure(0, weight=1) controlsFrame.rowconfigure(2, weight=1) self._createControls(controlsFrame) self._itemSelected(self.firstItem) itemsTree.selectChildByIndex(0) # Select the first item