parameters: (self, top, test)
return_statement: return True
docstring: Adjust a side.
  
          Returns FALSE if it's not physically possible to adjust it to
          this point.
docstring_summary: Adjust a side.
docstring_tokens: Adjust a side .
function: def AdjustTop(self, top, test):
          """Adjust a side.
  
          Returns FALSE if it's not physically possible to adjust it to
          this point.
          """
          y1 = self.GetY() - self.GetHeight() / 2.0
  
          if bottom <= y1:
              return False
  
          if test:
              return True
  
          newH = bottom - y1
          newY = y1 + newH / 2.0
          self.SetSize(self.GetWidth(), newH)
  
          dc = wx.ClientDC(self.GetCanvas())
          self.GetCanvas().PrepareDC(dc)
  
          self.Move(dc, self.GetX(), newY)
          return True
function_tokens: def AdjustTop ( self , top , test ) : y1 = self . GetY ( ) - self . GetHeight ( ) / 2.0 if bottom <= y1 : return False if test : return True newH = bottom - y1 newY = y1 + newH / 2.0 self . SetSize ( self . GetWidth ( ) , newH ) dc = wx . ClientDC ( self . GetCanvas ( ) ) self . GetCanvas ( ) . PrepareDC ( dc ) self . Move ( dc , self . GetX ( ) , newY ) return True