当前位置: 首页>>代码示例>>Python>>正文


Python tkFont.NORMAL属性代码示例

本文整理汇总了Python中tkFont.NORMAL属性的典型用法代码示例。如果您正苦于以下问题:Python tkFont.NORMAL属性的具体用法?Python tkFont.NORMAL怎么用?Python tkFont.NORMAL使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在tkFont的用法示例。


在下文中一共展示了tkFont.NORMAL属性的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _leave

# 需要导入模块: import tkFont [as 别名]
# 或者: from tkFont import NORMAL [as 别名]
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 
开发者ID:EDCD,项目名称:EDMarketConnector,代码行数:10,代码来源:theme.py

示例2: SetThemeType

# 需要导入模块: import tkFont [as 别名]
# 或者: from tkFont import NORMAL [as 别名]
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) 
开发者ID:dxwu,项目名称:BinderFilter,代码行数:12,代码来源:configDialog.py

示例3: SetKeysType

# 需要导入模块: import tkFont [as 别名]
# 或者: from tkFont import NORMAL [as 别名]
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) 
开发者ID:dxwu,项目名称:BinderFilter,代码行数:12,代码来源:configDialog.py

示例4: KeyBindingSelected

# 需要导入模块: import tkFont [as 别名]
# 或者: from tkFont import NORMAL [as 别名]
def KeyBindingSelected(self,event):
        self.buttonNewKeys.config(state=NORMAL) 
开发者ID:dxwu,项目名称:BinderFilter,代码行数:4,代码来源:configDialog.py

示例5: SetFontSample

# 需要导入模块: import tkFont [as 别名]
# 或者: from tkFont import NORMAL [as 别名]
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) 
开发者ID:dxwu,项目名称:BinderFilter,代码行数:11,代码来源:configDialog.py

示例6: SetHighlightTarget

# 需要导入模块: import tkFont [as 别名]
# 或者: from tkFont import NORMAL [as 别名]
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() 
开发者ID:dxwu,项目名称:BinderFilter,代码行数:12,代码来源:configDialog.py

示例7: KeyBindingSelected

# 需要导入模块: import tkFont [as 别名]
# 或者: from tkFont import NORMAL [as 别名]
def KeyBindingSelected(self, event):
        self.buttonNewKeys.config(state=NORMAL) 
开发者ID:aliyun,项目名称:oss-ftp,代码行数:4,代码来源:configDialog.py

示例8: SetFontSample

# 需要导入模块: import tkFont [as 别名]
# 或者: from tkFont import NORMAL [as 别名]
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) 
开发者ID:aliyun,项目名称:oss-ftp,代码行数:8,代码来源:configDialog.py

示例9: SetHighlightTarget

# 需要导入模块: import tkFont [as 别名]
# 或者: from tkFont import NORMAL [as 别名]
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() 
开发者ID:aliyun,项目名称:oss-ftp,代码行数:12,代码来源:configDialog.py

示例10: _colors

# 需要导入模块: import tkFont [as 别名]
# 或者: from tkFont import NORMAL [as 别名]
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 
开发者ID:EDCD,项目名称:EDMarketConnector,代码行数:46,代码来源:theme.py


注:本文中的tkFont.NORMAL属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。