gui/component.py
def resize(self, evt=None):
        "automatically adjust relative pos and size of children controls"
        if DEBUG: print "RESIZE!", self.name, self.width, self.height
        if not isinstance(self.wx_obj, wx.TopLevelWindow):
            # check that size and pos is relative, then resize/move
            if self._left and self._left[-1] == "%" or \
               self._top and self._top[-1] == "%":
                if DEBUG: print "MOVING", self.name, self._width
                self._set_pos((self._left, self._top))
            if self._width and self._width[-1] == "%" or \
               self._height and self._height[-1] == "%":
                if DEBUG: print "RESIZING", self.name, self._width, self._height
                self._set_size((self._width, self._height))
        for child in self:
            if isinstance(child, Control):
                child.resize(evt)
        # call original handler (wx.HtmlWindow)
        if evt:
            evt.Skip()
def resize(self, evt=None):
        "automatically adjust relative pos and size of children controls"
        if DEBUG: print "RESIZE!", self.name, self.width, self.height
        if not isinstance(self.wx_obj, wx.TopLevelWindow):
            # check that size and pos is relative, then resize/move
            if self._left and self._left[-1] == "%" or \
               self._top and self._top[-1] == "%":
                if DEBUG: print "MOVING", self.name, self._width
                self._set_pos((self._left, self._top))
            if self._width and self._width[-1] == "%" or \
               self._height and self._height[-1] == "%":
                if DEBUG: print "RESIZING", self.name, self._width, self._height
                self._set_size((self._width, self._height))
        for child in self:
            if isinstance(child, Control):
                child.resize(evt)
        # call original handler (wx.HtmlWindow)
        if evt:
            evt.Skip()
def resize ( self , evt = None ) : if DEBUG : print "RESIZE!" , self . name , self . width , self . height if not isinstance ( self . wx_obj , wx . TopLevelWindow ) : # check that size and pos is relative, then resize/move
 if self . _left and self . _left [ - 1 ] == "%" or self . _top and self . _top [ - 1 ] == "%" : if DEBUG : print "MOVING" , self . name , self . _width self . _set_pos ( ( self . _left , self . _top ) ) if self . _width and self . _width [ - 1 ] == "%" or self . _height and self . _height [ - 1 ] == "%" : if DEBUG : print "RESIZING" , self . name , self . _width , self . _height self . _set_size ( ( self . _width , self . _height ) ) for child in self : if isinstance ( child , Control ) : child . resize ( evt ) # call original handler (wx.HtmlWindow)
 if evt : evt . Skip ( )
automatically adjust relative pos and size of children controls
automatically adjust relative pos and size of children controls