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","."]
code: def Reset(self, rows, cols=3, destroy_windows=True):
      if destroy_windows:
          windows = []
          for j in range(self.__rows):
              for i in range(self.__cols):
                  item = self.get_item(i, j)
                  if item is None:
                      continue
                  if item.IsWindow():
                      window = item.GetWindow()
                      if isinstance(window, wx.Window):
                          windows.append(window)
          for window in windows:
              window.Hide()
              window.Destroy()
      self.Clear(False)
      self.__rows = rows
      self.__cols = cols
      self.__items = []
  
file_path: CellProfiler/src/frontend/cellprofiler/gui/module_view/_module_sizer.py
imports: import logging
  import wx
label_desc: Use image node_id 3 for calling the ModuleSizer obj's underlying member method code with example usage: obj.Reset(rows, cols, destroy_windows) without return types