Python tkFont.NORMAL Examples

The following are 17 code examples of tkFont.NORMAL(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module tkFont , or try the search function .
Example #1
Source File: configDialog.py    From oss-ftp with MIT License 5 votes vote down vote up
def SetKeysType(self):
        if self.keysAreBuiltin.get():
            self.optMenuKeysBuiltin.config(state=NORMAL)
            self.optMenuKeysCustom.config(state=DISABLED)
            self.buttonDeleteCustomKeys.config(state=DISABLED)
        else:
            self.optMenuKeysBuiltin.config(state=DISABLED)
            self.radioKeysCustom.config(state=NORMAL)
            self.optMenuKeysCustom.config(state=NORMAL)
            self.buttonDeleteCustomKeys.config(state=NORMAL) 
Example #2
Source File: configDialog.py    From Splunking-Crime with GNU Affero General Public License v3.0 5 votes vote down vote up
def SetHighlightTarget(self):
        if self.highlightTarget.get() == 'Cursor':  #bg not possible
            self.radioFg.config(state=DISABLED)
            self.radioBg.config(state=DISABLED)
            self.fgHilite.set(1)
        else:  #both fg and bg can be set
            self.radioFg.config(state=NORMAL)
            self.radioBg.config(state=NORMAL)
            self.fgHilite.set(1)
        self.SetColourSample() 
Example #3
Source File: configDialog.py    From Splunking-Crime with GNU Affero General Public License v3.0 5 votes vote down vote up
def SetFontSample(self, event=None):
        fontName = self.fontName.get()
        fontWeight = tkFont.BOLD if self.fontBold.get() else tkFont.NORMAL
        newFont = (fontName, self.fontSize.get(), fontWeight)
        self.labelFontSample.config(font=newFont)
        self.textHighlightSample.configure(font=newFont) 
Example #4
Source File: configDialog.py    From Splunking-Crime with GNU Affero General Public License v3.0 5 votes vote down vote up
def KeyBindingSelected(self, event):
        self.buttonNewKeys.config(state=NORMAL) 
Example #5
Source File: configDialog.py    From Splunking-Crime with GNU Affero General Public License v3.0 5 votes vote down vote up
def SetKeysType(self):
        if self.keysAreBuiltin.get():
            self.optMenuKeysBuiltin.config(state=NORMAL)
            self.optMenuKeysCustom.config(state=DISABLED)
            self.buttonDeleteCustomKeys.config(state=DISABLED)
        else:
            self.optMenuKeysBuiltin.config(state=DISABLED)
            self.radioKeysCustom.config(state=NORMAL)
            self.optMenuKeysCustom.config(state=NORMAL)
            self.buttonDeleteCustomKeys.config(state=NORMAL) 
Example #6
Source File: configDialog.py    From Splunking-Crime with GNU Affero General Public License v3.0 5 votes vote down vote up
def SetThemeType(self):
        if self.themeIsBuiltin.get():
            self.optMenuThemeBuiltin.config(state=NORMAL)
            self.optMenuThemeCustom.config(state=DISABLED)
            self.buttonDeleteCustomTheme.config(state=DISABLED)
        else:
            self.optMenuThemeBuiltin.config(state=DISABLED)
            self.radioThemeCustom.config(state=NORMAL)
            self.optMenuThemeCustom.config(state=NORMAL)
            self.buttonDeleteCustomTheme.config(state=NORMAL) 
Example #7
Source File: configDialog.py    From oss-ftp with MIT License 5 votes vote down vote up
def SetHighlightTarget(self):
        if self.highlightTarget.get() == 'Cursor':  #bg not possible
            self.radioFg.config(state=DISABLED)
            self.radioBg.config(state=DISABLED)
            self.fgHilite.set(1)
        else:  #both fg and bg can be set
            self.radioFg.config(state=NORMAL)
            self.radioBg.config(state=NORMAL)
            self.fgHilite.set(1)
        self.SetColourSample() 
Example #8
Source File: configDialog.py    From oss-ftp with MIT License 5 votes vote down vote up
def SetFontSample(self, event=None):
        fontName = self.fontName.get()
        fontWeight = tkFont.BOLD if self.fontBold.get() else tkFont.NORMAL
        newFont = (fontName, self.fontSize.get(), fontWeight)
        self.labelFontSample.config(font=newFont)
        self.textHighlightSample.configure(font=newFont) 
Example #9
Source File: configDialog.py    From oss-ftp with MIT License 5 votes vote down vote up
def KeyBindingSelected(self, event):
        self.buttonNewKeys.config(state=NORMAL) 
Example #10
Source File: theme.py    From EDMarketConnector with GNU General Public License v2.0 5 votes vote down vote up
def _leave(self, event, image):
        widget = event.widget
        if widget and widget['state'] != tk.DISABLED:
            widget.configure(state = tk.NORMAL)
            if image:
                image.configure(foreground = self.current['foreground'], background = self.current['background'])

    # Set up colors 
Example #11
Source File: configDialog.py    From oss-ftp with MIT License 5 votes vote down vote up
def SetThemeType(self):
        if self.themeIsBuiltin.get():
            self.optMenuThemeBuiltin.config(state=NORMAL)
            self.optMenuThemeCustom.config(state=DISABLED)
            self.buttonDeleteCustomTheme.config(state=DISABLED)
        else:
            self.optMenuThemeBuiltin.config(state=DISABLED)
            self.radioThemeCustom.config(state=NORMAL)
            self.optMenuThemeCustom.config(state=NORMAL)
            self.buttonDeleteCustomTheme.config(state=NORMAL) 
Example #12
Source File: configDialog.py    From BinderFilter with MIT License 5 votes vote down vote up
def SetHighlightTarget(self):
        if self.highlightTarget.get()=='Cursor': #bg not possible
            self.radioFg.config(state=DISABLED)
            self.radioBg.config(state=DISABLED)
            self.fgHilite.set(1)
        else: #both fg and bg can be set
            self.radioFg.config(state=NORMAL)
            self.radioBg.config(state=NORMAL)
            self.fgHilite.set(1)
        self.SetColourSample() 
Example #13
Source File: configDialog.py    From BinderFilter with MIT License 5 votes vote down vote up
def SetFontSample(self,event=None):
        fontName=self.fontName.get()
        if self.fontBold.get():
            fontWeight=tkFont.BOLD
        else:
            fontWeight=tkFont.NORMAL
        newFont = (fontName, self.fontSize.get(), fontWeight)
        self.labelFontSample.config(font=newFont)
        self.textHighlightSample.configure(font=newFont) 
Example #14
Source File: configDialog.py    From BinderFilter with MIT License 5 votes vote down vote up
def KeyBindingSelected(self,event):
        self.buttonNewKeys.config(state=NORMAL) 
Example #15
Source File: configDialog.py    From BinderFilter with MIT License 5 votes vote down vote up
def SetKeysType(self):
        if self.keysAreBuiltin.get():
            self.optMenuKeysBuiltin.config(state=NORMAL)
            self.optMenuKeysCustom.config(state=DISABLED)
            self.buttonDeleteCustomKeys.config(state=DISABLED)
        else:
            self.optMenuKeysBuiltin.config(state=DISABLED)
            self.radioKeysCustom.config(state=NORMAL)
            self.optMenuKeysCustom.config(state=NORMAL)
            self.buttonDeleteCustomKeys.config(state=NORMAL) 
Example #16
Source File: configDialog.py    From BinderFilter with MIT License 5 votes vote down vote up
def SetThemeType(self):
        if self.themeIsBuiltin.get():
            self.optMenuThemeBuiltin.config(state=NORMAL)
            self.optMenuThemeCustom.config(state=DISABLED)
            self.buttonDeleteCustomTheme.config(state=DISABLED)
        else:
            self.optMenuThemeBuiltin.config(state=DISABLED)
            self.radioThemeCustom.config(state=NORMAL)
            self.optMenuThemeCustom.config(state=NORMAL)
            self.buttonDeleteCustomTheme.config(state=NORMAL) 
Example #17
Source File: theme.py    From EDMarketConnector with GNU General Public License v2.0 4 votes vote down vote up
def _colors(self, root, theme):
        style = ttk.Style()
        if platform == 'linux2':
            style.theme_use('clam')

        # Default dark theme colors
        if not config.get('dark_text'):
            config.set('dark_text', '#ff8000')	# "Tangerine" in OSX color picker
        if not config.get('dark_highlight'):
            config.set('dark_highlight', 'white')

        if theme:
            # Dark
            (r, g, b) = root.winfo_rgb(config.get('dark_text'))
            self.current = {
                'background'         : 'grey4',	# OSX inactive dark titlebar color
                'foreground'         : config.get('dark_text'),
                'activebackground'   : config.get('dark_text'),
                'activeforeground'   : 'grey4',
                'disabledforeground' : '#%02x%02x%02x' % (r/384, g/384, b/384),
                'highlight'          : config.get('dark_highlight'),
                # Font only supports Latin 1 / Supplement / Extended, and a few General Punctuation and Mathematical Operators
                'font'               : (theme > 1 and not 0x250 < ord(_('Cmdr')[0]) < 0x3000 and
                                        tkFont.Font(family='Euro Caps', size=10, weight=tkFont.NORMAL) or
                                        'TkDefaultFont'),
            }
        else:
            # (Mostly) system colors
            style = ttk.Style()
            self.current = {
                'background'         : (platform == 'darwin' and 'systemMovableModalBackground' or
                                        style.lookup('TLabel', 'background')),
                'foreground'         : style.lookup('TLabel', 'foreground'),
                'activebackground'   : (platform == 'win32' and 'SystemHighlight' or
                                        style.lookup('TLabel', 'background', ['active'])),
                'activeforeground'   : (platform == 'win32' and 'SystemHighlightText' or
                                        style.lookup('TLabel', 'foreground', ['active'])),
                'disabledforeground' : style.lookup('TLabel', 'foreground', ['disabled']),
                'highlight'          : 'blue',
                'font'               : 'TkDefaultFont',
            }


    # Apply current theme to a widget and its children, and register it for future updates