]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/HyperLinkCtrl.py
The great wxVScrolledWindow refactoring: allow using it both horizontal and
[wxWidgets.git] / wxPython / demo / HyperLinkCtrl.py
index 31bc6efe11737e313064658cbc962759a14d512e..8573b747856d8c57d7996e3d19e31ea796a4cb74 100644 (file)
@@ -54,7 +54,7 @@ class TestPanel(wx.Panel):
         self._hyper3.Bind(hl.EVT_HYPERLINK_RIGHT, self.OnRightLink)
         
         self._hyper3.SetLinkCursor(wx.CURSOR_QUESTION_ARROW)
-        self._hyper3.SetColours("GREEN", "RED", "YELLOW")
+        self._hyper3.SetColours("DARK GREEN", "RED", "NAVY")
         self._hyper3.SetUnderlines(False, False, False)
         self._hyper3.EnableRollover(True)
         self._hyper3.SetBold(True)
@@ -89,13 +89,13 @@ class TestPanel(wx.Panel):
         
         
     def OnRightLink(self, event):
-        pos = event.GetPosition()
+        pos = self._hyper3.GetPosition() + event.GetPosition()
         menuPopUp = wx.Menu("Having a nice day?")
         ID_MENU_YES = wx.NewId()
         ID_MENU_NO  = wx.NewId()
         menuPopUp.Append(ID_MENU_YES, "Yes, absolutely!")
         menuPopUp.Append(ID_MENU_NO,  "I've had better")
-        self.PopupMenu(menuPopUp, self._hyper3.GetPosition())
+        self.PopupMenu(menuPopUp)
         menuPopUp.Destroy()