class_docstr: The module sizer uses the maximum best width of the setting
  edit controls to compute the column widths, then it sets the text
  controls to wrap within the remaining space, then it uses the best
  height of each text control to lay out the rows.
class_docstr_tok: ["The","module","sizer","uses","the","maximum","best","width","of","the","setting","edit","controls","to","compute","the","column","widths",",","then","it","sets","the","text","controls","to","wrap","within","the","remaining","space",",","then","it","uses","the","best","height","of","each","text","control","to","lay","out","the","rows","."]
docstr: Calculate the minimum from the edit controls.  Returns a
  wx.Size where the height is the total height of the grid and
  the width is self.__min_text_width plus the widths of the edit
  controls and help controls.
docstr_tok: ["Calculate","the","minimum","from","the","edit","controls",".","Returns","a","wx.Size","where","the","height","is","the","total","height","of","the","grid","and","the","width","is","self.__min_text_width","plus","the","widths","of","the","edit","controls","and","help","controls","."]
code: def CalcMin(self):
      """Calculate the minimum from the edit controls.  Returns a
      wx.Size where the height is the total height of the grid and
      the width is self.__min_text_width plus the widths of the edit
      controls and help controls.
      """
      try:
          if (
              self.__rows * self.__cols == 0
              or self.Children is None
              or len(self.Children) == 0
          ):
              return wx.Size(0, 0)
          height = self.__height_padding
          for j in range(0, self.__rows):
              borders = [
                  self.get_item(col, j).GetBorder()
                  for col in range(2)
                  if self.get_item(col, j) is not None
              ]
              if len(borders) == 0:
                  height += 10
              else:
                  height_border = max(borders)
                  height += self.get_row_height(j) + 2 * height_border
          height += self.__height_padding
          self.__printed_exception = False
          return wx.Size(
              self.calc_edit_size()[0]
              + self.__min_text_width
              + self.calc_help_size()[0],
              height,
          )
      except:
          # This happens, hopefully transiently, on the Mac
          if not self.__printed_exception:
              LOGGER.error("WX internal error detected", exc_info=True)
              self.__printed_exception = True
          return wx.Size(0, 0)
  
file_path: CellProfiler/src/frontend/cellprofiler/gui/module_view/_module_sizer.py
imports: import logging
  import wx
label_desc: Use image node_id 5 for calling the ModuleSizer obj's underlying member method code with example usage: obj.CalcMin() and returns: wx, wx, wx