class_docstr: A controller for the BinaryMatrix setting
      
class_docstr_tok: ["A","controller","for","the","BinaryMatrix","setting"]
code: def update(self):
      h, w = self.setting.get_size()
      hh, ww = [(x - 1) / 2 for x in (h, w)]
      if self.height_ctrl.GetValue() != hh:
          self.height_ctrl.SetValue(hh)
      if self.width_ctrl.GetValue() != ww:
          self.width_ctrl.SetValue(ww)
      r = self.get_matrix_element_rect(h - 1, w - 1)
      b = wx.SystemSettings.GetMetric(wx.SYS_EDGE_X)
      self.matrix_ctrl.SetMinSize(
          wx.Size(r.GetRight() + b, r.GetBottom() + b)
      )
      self.matrix_ctrl.Refresh(eraseBackground=False)
  
file_path: CellProfiler/src/frontend/cellprofiler/gui/module_view/_binary_matrix_controller.py
imports: import wx
  from cellprofiler_core.preferences import get_background_color
  from cellprofiler_core.setting import BinaryMatrix
  from ._module_view import ModuleView
  from ..utilities.module_view import edit_control_name
label_desc: Use image node_id 2 for calling the BinaryMatrixController obj's underlying member method code with example usage: obj.update() without return types