code: def OnFont(self, event):
          
  
          font_data = wx.FontData()
  
          # Disable color chooser on Windows
          font_data.EnableEffects(False)
  
          if self.chosen_font:
              font_data.SetInitialFont(self.chosen_font)
  
          dlg = wx.FontDialog(self, font_data)
  
          if dlg.ShowModal() == wx.ID_OK:
              font_data = dlg.GetFontData()
  
              font = self.chosen_font = font_data.GetChosenFont()
  
              self.font_face = font.GetFaceName()
              self.font_size = font.GetPointSize()
              self.font_style = font.GetStyle()
              self.font_weight = font.GetWeight()
  
          dlg.Destroy()
  
          post_command_event(self, self.DrawChartMsg)
docs: Check event handler