Exemple #1
0
 def __init__(self):
     np.PropertyOwner.__init__(self)
     self.proportion = np.LayoutProportionProperty(0)
     self.span = np.LayoutSpanProperty((1, 1))
     self.border = np.SpinProperty(0)
     self.flag = np.ManagedFlags(None)
     self.pos = np.SpinProperty(None)
Exemple #2
0
    def __init__(self, name, klass, parent, id, sizer, pos):
        WindowBase.__init__(self, name, klass, parent, id)
        # if True, the user is able to control the layout of the widget
        # inside the sizer (proportion, borders, alignment...)
        self._has_layout = not sizer.is_virtual()

        # attributes to keep the values of the sizer properties
        self.pos        = np.LayoutPosProperty(pos)            # position within the sizer, 1-based
        self.span       = np.LayoutSpanProperty((1,1))         # cell spanning for GridBagSizer
        self.proportion = np.LayoutProportionProperty(0)       # item growth in sizer main direction
        self.border     = np.SpinProperty(0, immediate=True)   # border width
        self.flag       = np.ManagedFlags(wx.ADJUST_MINSIZE)   # alignment, border; expansion in other dir.

        self.sizer = sizer
        sizer.add_item(self, pos)