def create_widgets(self, master): self.frame = ttk.Frame(master) self.restoreFrame = ttk.Labelframe(self.frame, text="Restore") self.restoreWindowCheckbutton = TkUtil.Checkbutton( self.restoreFrame, text="Window Position and Size", underline=0, variable=self.restoreWindow) TkUtil.Tooltip.Tooltip( self.restoreWindowCheckbutton, "Restore Toolbars and Window Position and Size at Startup") self.restoreFontCheckbutton = TkUtil.Checkbutton( self.restoreFrame, text="Font Settings", underline=0, variable=self.restoreFont) TkUtil.Tooltip.Tooltip( self.restoreFontCheckbutton, "Restore the Last Used Font Settings at Startup") self.restoreSessionCheckbutton = TkUtil.Checkbutton( self.restoreFrame, text="Session", underline=0, variable=self.restoreSession) TkUtil.Tooltip.Tooltip(self.restoreSessionCheckbutton, "Open the Last Edited File at Startup") self.otherFrame = ttk.Labelframe(self.frame, text="Other") self.blinkCheckbutton = TkUtil.Checkbutton(self.otherFrame, text="Blinking Cursor", underline=0, variable=self.blink) TkUtil.Tooltip.Tooltip(self.blinkCheckbutton, "Switch Cursor Blink On or Off")
def create_widgets(self): self.findLabel = TkUtil.Label(self, text="Find:", underline=1) self.findEntry = ttk.Entry(self, width=25) self.replaceLabel = TkUtil.Label(self, text="Replace:", underline=1) self.replaceEntry = ttk.Entry(self, width=25) self.caseSensitiveCheckbutton = TkUtil.Checkbutton( self, text="Case Sensitive", underline=5, variable=self.caseSensitive) self.wholeWordsCheckbutton = TkUtil.Checkbutton( self, text="Whole Words", underline=0, variable=self.wholeWords) self.findButton = TkUtil.Button(self, text="Find", underline=0, command=self.find, default=tk.ACTIVE, state=tk.DISABLED) self.replaceButton = TkUtil.Button(self, text="Replace", underline=0, command=self.replace, state=tk.DISABLED) self.closeButton = TkUtil.Button(self, text="Close", underline=0, command=self.close) if TkUtil.x11(): self.extendButton = TkUtil.ToggleButton(self, text="Extend", underline=1, command=self.toggle_extend) else: self.extendButton = ttk.Button(self, text="Extend", underline=1, command=self.toggle_extend, image=self.images[UNEXTEND], compound=tk.LEFT) self.extensionWidgets = (self.replaceLabel, self.replaceEntry, self.replaceButton)
def create_advanced_widgets(self, master): self.delayLabel = TkUtil.Label(master, text="Delay (ms)", underline=0) self.delaySpinbox = Spinbox(master, textvariable=self.delay, from_=Board.MIN_DELAY, to=Board.MAX_DELAY, increment=25, width=4, justify=tk.RIGHT, validate="all") self.delaySpinbox.config( validatecommand=(self.delaySpinbox.register(self.validate_int), "delaySpinbox", "%P")) self.zoomLabel = TkUtil.Label(master, text="Zoom (%)", underline=0) self.zoomSpinbox = Spinbox(master, textvariable=self.options.zoom, from_=Board.MIN_ZOOM, to=Board.MAX_ZOOM, increment=Board.ZOOM_INC, width=4, justify=tk.RIGHT, validate="all") self.zoomSpinbox.config( validatecommand=(self.zoomSpinbox.register(self.validate_int), "zoomSpinbox", "%P")) self.showToolbarCheckbutton = TkUtil.Checkbutton( master, text="Show Toolbar", underline=5, variable=self.showToolbar) self.restoreCheckbutton = TkUtil.Checkbutton(master, text="Restore Position", underline=0, variable=self.restore)