class_docstr: Container for measurement controls
class_docstr_tok: ["Container","for","measurement","controls"]
code: def update_choices(self, control, choices):
      assert isinstance(control, wx.Choice)
      old_names = control.GetItems()
      if tuple(sorted(old_names)) == tuple(sorted(choices)):
          return
      self.process_events = False
      try:
          old_choice = self.__get_selected_choice(control)
          if old_choice is not None and old_choice not in choices:
              choices = choices + [old_choice]
          control.SetItems(choices)
          if old_choice is not None:
              control.SetStringSelection(old_choice)
      finally:
          self.process_events = True
  
file_path: CellProfiler/src/frontend/cellprofiler/gui/workspace_view/_workspace_view_measurement_row.py
imports: import wx
  import wx.lib
  import wx.lib.colourselect
  from ..constants.workspace_view import C_CHOOSER
  from ..constants.workspace_view import C_COLOR
  from ..constants.workspace_view import C_SHOW
label_desc: Use image node_id 8 for calling the WorkspaceViewMeasurementRow obj's underlying member method code with example usage: obj.update_choices(control, choices) without return types