-
- def OnDoPopup(self, evt):
- menu = wx.Menu()
- # Make this first item bold
- item = wx.MenuItem(menu, wx.NewId(), "If supported, this is bold")
- df = wx.SystemSettings.GetFont(wx.SYS_DEFAULT_GUI_FONT)
-
- nf = wx.Font(
- df.GetPointSize(), df.GetFamily(), df.GetStyle(),
- wx.BOLD, False, df.GetFaceName()
- )
-
- item.SetFont(nf)
- menu.AppendItem(item)
-
- menu.AppendItem(wx.MenuItem(menu, wx.NewId(), "Normal Item &1"))
- menu.AppendItem(wx.MenuItem(menu, wx.NewId(), "Normal Item &2"))
- menu.AppendItem(wx.MenuItem(menu, wx.NewId(), "Normal Item &3"))
- menu.AppendItem(wx.MenuItem(menu, wx.NewId(), "Normal Item &4"))
-
- self.PopupMenu(menu, evt.GetPosition())
- menu.Destroy()
- evt.Skip()
-
-