mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 03:20:08 +01:00
More demo tweaks and fixes
This commit is contained in:
@@ -25,6 +25,7 @@ class TestPanel(wx.Panel):
|
||||
# Init the context help button.
|
||||
# And even include help text about the help button :-)
|
||||
cBtn = wx.ContextHelpButton(self)
|
||||
cBtn.Bind(wx.EVT_BUTTON, self.OnCtxHelpButton)
|
||||
cBtn.SetHelpText("wx.ContextHelpButton")
|
||||
|
||||
cBtnText = wx.StaticText(self, -1,
|
||||
@@ -63,7 +64,6 @@ class TestPanel(wx.Panel):
|
||||
sizer.Add(text)
|
||||
text.Bind(wx.EVT_HELP, self.OnCtxHelp2, text)
|
||||
|
||||
|
||||
border = wx.BoxSizer(wx.VERTICAL)
|
||||
border.Add(sizer, 0, wx.ALL, 25)
|
||||
|
||||
@@ -72,9 +72,16 @@ class TestPanel(wx.Panel):
|
||||
self.Layout()
|
||||
|
||||
|
||||
def OnCtxHelpButton(self, evt):
|
||||
# This starts a nested event loop which exits when an item has been
|
||||
# clicked on, its help message shown and dismissed.
|
||||
cshelp = wx.ContextHelp(self)
|
||||
|
||||
|
||||
# On the second text control above, we intercept the help event. This is where
|
||||
# we process it. Anything could happen here. In this case we're just printing
|
||||
# some stuff about it, then passing it on, at which point we see the help tip.
|
||||
# some stuff about it, then passing it on with Skip(), at which point we
|
||||
# see the help tip.
|
||||
def OnCtxHelp(self, evt):
|
||||
self.log.write("OnCtxHelp: %s" % evt)
|
||||
evt.Skip()
|
||||
|
||||
Reference in New Issue
Block a user