當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。