parameters: (self)
return_statement: return (rows, cols)
docstring: CalcRowsCols() -> (rows, cols)
  
          Calculates how many rows and columns will be in the sizer based
          on the current number of items and also the rows, cols specified
          in the constructor.
docstring_summary: CalcRowsCols() -> (rows, cols)
docstring_tokens: CalcRowsCols () - > ( rows cols )
function: def CalcRowsCols(self):
          """
          CalcRowsCols() -> (rows, cols)
  
          Calculates how many rows and columns will be in the sizer based
          on the current number of items and also the rows, cols specified
          in the constructor.
          """
          nitems = len(self.GetChildren())
          rows = self.GetRows()
          cols = self.GetCols()
          assert rows != 0 or cols != 0, "Grid sizer must have either rows or columns fixed"
          if cols != 0:
              rows = (nitems + cols - 1) / cols
          elif rows != 0:
              cols = (nitems + rows - 1) / rows
          return (rows, cols)
function_tokens: def CalcRowsCols ( self ) : nitems = len ( self . GetChildren ( ) ) rows = self . GetRows ( ) cols = self . GetCols ( ) assert rows != 0 or cols != 0 , "Grid sizer must have either rows or columns fixed" if cols != 0 : rows = ( nitems + cols - 1 ) / cols elif rows != 0 : cols = ( nitems + rows - 1 ) / rows return ( rows , cols )