code: def OnDirectionChoice(self, event):
          
  
          label = self.direction_choicectrl.GetItems()[event.GetSelection()]
          param = self.choice_label2param[label]
          self.attrs["direction"] = param
  
          post_command_event(self, self.DrawChartMsg)
docs: Direction choice event handler