class_docstr: The DataTypeController manages a DataType setting
class_docstr_tok: ["The","DataTypeController","manages","a","DataType","setting"]
code: def on_choice_changed(self, event):
      result = {}
      for i in range(1, self.n_items + 1):
          label = self.panel.FindWindowByName(
              self.get_label_control_name(i)
          )
          choice = self.panel.FindWindowByName(
              self.get_choice_control_name(i)
          )
          result[label.Label] = self.DTC_TO_DT[
              choice.GetStringSelection()
          ]
      result = DataTypes.encode_data_types(result)
      if self.v.value != result:
          self.module_view.on_value_change(
              self.v, self.panel, result, event
          )
  
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 6 for calling the DataTypeController obj's underlying member method code with example usage: obj.on_choice_changed(event) without return types