Ejemplo n.º 1
0
    def __init__(self, hwnd, *styles):
        self.Style = Styles
        self.Msg = Msgs

        styles += 'subclass',
        control.ControlFromHandle.__init__(self, hwnd, *styles)
        self._client_clrBar = gdi.GetSysColor('highlight')
        self._client_clrBk = gdi.GetSysColor('btnface')
        self._client_clrText = gdi.GetSysColor('btntext')
        self._client_clrTextHi = gdi.GetSysColor('highlighttext')
        self._client_text = title or None
Ejemplo n.º 2
0
    def __init__(self, parent, title, x, y, w, h, *styles):
        self.Style = Styles
        self.Msg = Msgs

        styles += 'subclass',
        control.BaseControl.__init__(self, parent, "msctls_progress32", '', x,
                                     y, w, h, *styles)
        self._client_clrBar = gdi.GetSysColor('highlight')
        self._client_clrBk = gdi.GetSysColor('btnface')
        self._client_clrText = gdi.GetSysColor('btntext')
        self._client_clrTextHi = gdi.GetSysColor('highlighttext')
        self._client_text = title or None
Ejemplo n.º 3
0
 def SetTextHilightColor(self, colorref):
     prevcolor = self._client_clrTextHi
     if colorref == None:
         self._client_clrTextHi = gdi.GetSysColor('highlighttext')
     else:
         self._client_clrTextHi = colorref
     return prevcolor
Ejemplo n.º 4
0
 def SetTextColor(self, colorref):
     prevcolor = self._client_clrText
     if colorref == None:
         self._client_clrText = gdi.GetSysColor('btntext')
     else:
         self._client_clrText = colorref
     return prevcolor
Ejemplo n.º 5
0
 def SetBkColor(self, colorref):
     CLR_DEFAULT = 0x4278190080
     if colorref == None:
         colorref = CLR_DEFAULT
         self._client_clrBk = gdi.GetSysColor('btnface')
     else:
         self._client_clrBk = colorref
     return self.SendMessage(self.Hwnd, self.Msg.PBM_SETBKCOLOR, 0,
                             colorref)
Ejemplo n.º 6
0
 def SetBarColor(self, colorref):
     CLR_DEFAULT = 0x4278190080
     if colorref == None:
         colorref = CLR_DEFAULT
         self._client_clrBar = gdi.GetSysColor('highlight')
     else:
         self._client_clrBar = colorref
     return self.SendMessage(self.Hwnd, self.Msg.PBM_SETBARCOLOR, 0,
                             colorref)