class_docstr: The DataTypeController manages a DataType setting
class_docstr_tok: ["The","DataTypeController","manages","a","DataType","setting"]
code: def __init__(self, module_view, v):
      assert isinstance(v, DataTypes)
      self.module_view = module_view
      self.v = v
      self.panel = module_view.module_panel.FindWindowByName(
          edit_control_name(v)
      )
      if self.panel is None:
  
          class DoesntInheritBackgroundColor(wx.Panel):
              def InheritsBackgroundColour(self):
                  return False
  
          self.panel = DoesntInheritBackgroundColor(
              module_view.module_panel, -1, name=edit_control_name(v)
          )
          self.panel.Sizer = wx.lib.rcsizer.RowColSizer()
          self.panel.Bind(wx.EVT_PAINT, self.on_paint)
      self.panel.controller = self
      self.n_items = 0
      self.update()
  
file_path: CellProfiler/src/frontend/cellprofiler/gui/module_view/_data_type_controller.py
imports: import wx
  import wx.lib.rcsizer
  from cellprofiler_core.setting import DataTypes
  from ._module_view import ModuleView
  from ..utilities.module_view import edit_control_name
label_desc: Use image node_id 1 to create a new DataTypeController object  with example: obj = DataTypeController(module_view, v)