def openNewTab(self, filename): editArea = EditArea(self.noteBook, wrap = WORD, height = 50, width = 120, bg = '#34352E', fg = 'white', insertbackground = 'white', font = tkFont.Font(family='DejaVu Sans ExtraLight', size=10), tabs=("1c"), undo=True ) editArea.pack(fill=BOTH, expand=True) self.noteBook.add(editArea, text=filename) self.editArea = editArea
def __init__(self, win, **args): Frame.__init__(self, win, **args) self.pack(fill=BOTH); # Attributes self.filename = None # NoteBook self.noteBook = Notebook(self) self.noteBook.pack(side=RIGHT, fill=BOTH, padx=10, pady=10) # Edit Area editArea = EditArea(self.noteBook, wrap = WORD, height = 50, width = 120, bg = '#34352E', fg = 'white', insertbackground = 'white', font = tkFont.Font(family='DejaVu Sans ExtraLight', size=10), tabs=("1c"), undo=True ) editArea.pack(fill=BOTH, expand=True) self.noteBook.add(editArea, text='One') # Actual Area self.editArea = editArea # TopLevel Bar self.initMenuBar(win) # Three View Directory self.treeView = Treeview(self) self.treeView.pack(side=LEFT, fill=BOTH, expand=YES) # Key Bindings self.bind_class("Text", "<Control-a>", self.editArea.selectAll) self.bind_class("TNotebook", "<ButtonPress-3>", self.onTabClick, True) self.treeView.bind("<Double-1>", self.onTreeFileClick)