示例#1
0
 def on_margins_changed(self, v):
     if isinstance(v, int):
         self.left_margin = self.right_margin = \
             self.top_margin = self.bottom_margin = const(v)
     else:
         v = (list(v) + [0, 0, 0, 0])[:4]
         self.left_margin, self.top_margin, \
             self.right_margin, self.bottom_margin = consts(*v)
示例#2
0
 def on_vertical_center_changed(self, v):
     if v: self.top = self.bottom = const('')
示例#3
0
 def on_horizontal_center_changed(self, v):
     if v: self.left = self.right = const('')
示例#4
0
 def on_center_changed(self, v):
     self.fill = self.left = self.right = self.top = self.bottom = const('')
示例#5
0
 def on_bottom_changed(self, v):
     if self.fill != v: self.fill = const('')
     if v: self.center = const('')
示例#6
0
 def on_right_changed(self, v):
     if self.fill != v: self.fill = const('')
     if v: self.center = const('')
示例#7
0
 def on_fill_changed(self, v):
     self.left = self.right = self.top = self.bottom = const(v)
     self.center = ''