Exemple #1
0
 def SetStyle(self, *styles):
     """Use this at your own risk."""
     st = {
         'blackframe': 7,
         'grayframe': 8,
         'whiteframe': 9,
         'etchedframe': 18
     }
     style = ControlMethods.GetStyleL(self, 'style')
     out = []
     flag = False
     for i in styles:
         if i in st:
             style |= 7 | 8 | 9 | 18
             style ^= 7 | 8 | 9 | 18
             style |= st[i]
             flag = True
         else:
             out.append(i)
     if flag:
         ControlMethods.SetStyleL(self, 'style', style)
         # Not enough
         #self.OffsetWindowSize(1, 1)
         #self.OffsetWindowSize(-1, -1)
         x, y, w, h = self.GetWindowRect().ToSize()
         self.SetWindowSize(0, 0)
         self.SetWindowSize(w, h)
     if out: ControlMethods.SetStyle(self, *out)
Exemple #2
0
 def SetStyle(self, *styles):
     lv_styles = ['icon', 'report', 'smallicon', 'list']
     style = ControlMethods.GetStyleL(self, 'style')
     out = []
     flag = False
     for i in styles:
         if i in lv_styles:
             style &= (~3)
             style |= lv_styles.index(i)
             flag = True
         else:
             out.append(i)
     if flag: ControlMethods.SetStyleL(self, 'style', style)
     if out: ControlMethods.SetStyle(self, *out)
Exemple #3
0
 def SetStyle(self, *styles):
     """  """
     st = {
         'left': 0,
         'center': 1,
         'right': 2,
         'simple': 11,
         'leftnowordwrap': 12
     }
     style = ControlMethods.GetStyleL(self, 'style')
     out = []
     flag = False
     for i in styles:
         if i in st:
             style |= 1 | 2 | 11 | 12
             style ^= 1 | 2 | 11 | 12
             style |= st[i]
             flag = True
         else:
             out.append(i)
     if flag:
         ControlMethods.SetStyleL(self, 'style', style)
     if out:
         ControlMethods.SetStyle(self, *out)
Exemple #4
0
 def SetFrame(self):
     style = ControlMethods.GetStyleL(self, 'style')
     style |= 7 | 8 | 9 | 16 | 17 | 18
     style ^= 7 | 8 | 9 | 16 | 17 | 18
     style |= 18
     ControlMethods.SetStyleL(self, 'style', style)