Python wx.SYS_COLOUR_GRAYTEXT Examples

The following are 6 code examples of wx.SYS_COLOUR_GRAYTEXT(). 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 wx , or try the search function .
Example #1
Source File: uicore.py    From NXP-MCUBootUtility with Apache License 2.0 6 votes vote down vote up
def resetSecureBootSeqColor( self ):
        self.resetCertificateColor()
        self.m_panel_genImage1_browseApp.SetBackgroundColour( uidef.kBootSeqColor_Invalid )
        self.m_panel_genImage1_browseApp.Enable( False )
        self.m_panel_genImage2_habCryptoAlgo.SetBackgroundColour( uidef.kBootSeqColor_Invalid )
        self.m_panel_genImage2_habCryptoAlgo.Enable( False )
        self.m_panel_genImage3_enableCertForHwCrypto.SetBackgroundColour( uidef.kBootSeqColor_Invalid )
        self.m_panel_genImage3_enableCertForHwCrypto.Enable( False )
        self.m_button_genImage.SetBackgroundColour( uidef.kBootSeqColor_Invalid )
        self.m_button_genImage.Enable( False )
        self.resetKeyStorageRegionColor()
        self.m_panel_flashImage1_showImage.SetBackgroundColour( uidef.kBootSeqColor_Invalid )
        self.m_panel_flashImage1_showImage.Enable( False )
        self.m_button_flashImage.SetBackgroundColour( uidef.kBootSeqColor_Invalid )
        self.m_button_flashImage.Enable( False )
        self.m_panel_progDek1_showHabDek.SetBackgroundColour( uidef.kBootSeqColor_Invalid )
        self.m_panel_progDek1_showHabDek.Enable( False )
        self.m_textCtrl_habDek128bit.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_GRAYTEXT ) )
        self.m_textCtrl_habDek128bit.Enable( False )
        self.m_button_progDek.SetBackgroundColour( uidef.kBootSeqColor_Invalid )
        self.m_button_progDek.Enable( False )
        self.Refresh() 
Example #2
Source File: uicore.py    From NXP-MCUBootUtility with Apache License 2.0 6 votes vote down vote up
def resetKeyStorageRegionColor( self ):
        self.m_panel_prepHwCrypto1_hwCryptoKeyRegion.SetBackgroundColour( uidef.kBootSeqColor_Invalid )
        self.m_panel_prepHwCrypto1_hwCryptoKeyRegion.Enable( False )
        self.m_panel_prepHwCrypto2_hwCryptoAlgo.SetBackgroundColour( uidef.kBootSeqColor_Invalid )
        self.m_panel_prepHwCrypto2_hwCryptoAlgo.Enable( False )
        self.m_button_prepHwCrypto.SetBackgroundColour( uidef.kBootSeqColor_Invalid )
        self.m_button_prepHwCrypto.Enable( False )
        self.m_panel_operHwCrypto1_hwCryptoKeyInfo.SetBackgroundColour( uidef.kBootSeqColor_Invalid )
        self.m_panel_operHwCrypto1_hwCryptoKeyInfo.Enable( False )
        self.m_panel_operHwCrypto2_showGp4Dek.SetBackgroundColour( uidef.kBootSeqColor_Invalid )
        self.m_panel_operHwCrypto2_showGp4Dek.Enable( False )
        self.m_textCtrl_gp4Dek128bit.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_GRAYTEXT ) )
        self.m_textCtrl_gp4Dek128bit.Enable( False )
        self.m_panel_operHwCrypto3_showSwgp2Dek.SetBackgroundColour( uidef.kBootSeqColor_Invalid )
        self.m_panel_operHwCrypto3_showSwgp2Dek.Enable( False )
        self.m_textCtrl_swgp2Dek128bit.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_GRAYTEXT ) )
        self.m_textCtrl_swgp2Dek128bit.Enable( False )
        self.m_button_operHwCrypto.SetBackgroundColour( uidef.kBootSeqColor_Invalid )
        self.m_button_operHwCrypto.Enable( False )
        self.Refresh() 
Example #3
Source File: uicore.py    From NXP-MCUBootUtility with Apache License 2.0 6 votes vote down vote up
def resetCertificateColor( self ):
        self.m_panel_doAuth1_certInput.SetBackgroundColour( uidef.kBootSeqColor_Invalid )
        self.m_textCtrl_serial.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_GRAYTEXT ) )
        self.m_textCtrl_keyPass.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_GRAYTEXT ) )
        self.m_panel_doAuth1_certInput.Enable( False )
        self.m_panel_doAuth2_certFmt.SetBackgroundColour( uidef.kBootSeqColor_Invalid )
        self.m_panel_doAuth2_certFmt.Enable( False )
        self.m_button_genCert.SetBackgroundColour( uidef.kBootSeqColor_Invalid )
        self.m_button_genCert.Enable( False )
        self.m_panel_progSrk1_showSrk.SetBackgroundColour( uidef.kBootSeqColor_Invalid )
        self.m_panel_progSrk1_showSrk.Enable( False )
        self.m_textCtrl_srk256bit.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_GRAYTEXT ) )
        self.m_textCtrl_srk256bit.Enable( False )
        self.m_button_progSrk.SetBackgroundColour( uidef.kBootSeqColor_Invalid )
        self.m_button_progSrk.Enable( False )
        self.Refresh() 
Example #4
Source File: RTxxx_uicore.py    From NXP-MCUBootUtility with Apache License 2.0 5 votes vote down vote up
def RTxxx_updateOtpRegionField( self ):
        self.resetFuseOtpRegionField()
        color = None
        if self.isToolRunAsEntryMode:
            color = wx.SYS_COLOUR_GRAYTEXT
            if self.mcuSeries == uidef.kMcuSeries_iMXRTxxx:
                if self.efuseGroupSel == 0:
                    self.m_textCtrl_fuse440.SetBackgroundColour( wx.SystemSettings.GetColour( color ) )
                    self.m_textCtrl_fuse480.SetBackgroundColour( wx.SystemSettings.GetColour( color ) )
                    self.m_textCtrl_fuse490.SetBackgroundColour( wx.SystemSettings.GetColour( color ) )
                elif self.efuseGroupSel == 1:
                    pass
                elif self.efuseGroupSel == 2:
                    pass
                elif self.efuseGroupSel == 3:
                    pass
                elif self.efuseGroupSel == 4:
                    pass
                elif self.efuseGroupSel == 5:
                    pass
                elif self.efuseGroupSel == 6:
                    pass
                else:
                    pass
            else:
                pass
        self.Refresh() 
Example #5
Source File: DownloadManager.py    From BitTorrent with GNU General Public License v3.0 5 votes vote down vote up
def reset_text(self, force=False):
        self.dont_reset = True
        if force or self.GetValue() == '':
            self.SetValue(self.default_text)
            self.SetStyle(0, len(self.default_text),
                          wx.TextAttr(wx.SystemSettings_GetColour(wx.SYS_COLOUR_GRAYTEXT)))
        self.dont_reset = False 
Example #6
Source File: ConfTreeNodeEditor.py    From OpenPLC_Editor with GNU General Public License v3.0 5 votes vote down vote up
def DrawLabel(self, dc, width, height, dw=0, dy=0):
        bmp = self.bmpLabel
        if bmp is not None:     # if the bitmap is used
            if self.bmpDisabled and not self.IsEnabled():
                bmp = self.bmpDisabled
            if self.bmpFocus and self.hasFocus:
                bmp = self.bmpFocus
            if self.bmpSelected and not self.up:
                bmp = self.bmpSelected
            bw, bh = bmp.GetWidth(), bmp.GetHeight()
            if not self.up:
                dw = dy = self.labelDelta
            hasMask = bmp.GetMask() is not None
        else:
            bw = bh = 0     # no bitmap -> size is zero

        dc.SetFont(self.GetFont())
        if self.IsEnabled():
            dc.SetTextForeground(self.GetForegroundColour())
        else:
            dc.SetTextForeground(wx.SystemSettings.GetColour(wx.SYS_COLOUR_GRAYTEXT))

        label = self.GetLabel()
        tw, th = dc.GetTextExtent(label)        # size of text
        if not self.up:
            dw = dy = self.labelDelta

        pos_x = (width - bw) // 2 + dw      # adjust for bitmap and text to centre
        pos_y = (height - bh - th) // 2 + dy
        if bmp is not None:
            dc.DrawBitmap(bmp, pos_x, pos_y, hasMask)  # draw bitmap if available
            pos_x = (width-tw)//2+dw      # adjust for bitmap and text to centre
            pos_y += bh + 2

        dc.DrawText(label, pos_x, pos_y)      # draw the text