code: def OnTextFont(self, event):
          
  
          fontchoice_combobox = event.GetEventObject()
          idx = event.GetInt()
  
          try:
              font_string = fontchoice_combobox.GetString(idx)
          except AttributeError:
              font_string = event.GetString()
  
          post_command_event(self, self.FontMsg, font=font_string)
docs: Text font choice event handler