dabo Commit
Revision 3103
Date: 2007-05-06 12:24:13 -0700 (Sun, 06 May 2007)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/3103

Changed:
U   trunk/dabo/ui/uiwx/dHtmlBox.py

Log:
Added code to handle link processing in dHtmlBox for versions of wxPython prior 
to 2.7.


Diff:
Modified: trunk/dabo/ui/uiwx/dHtmlBox.py
===================================================================
--- trunk/dabo/ui/uiwx/dHtmlBox.py      2007-05-06 17:46:15 UTC (rev 3102)
+++ trunk/dabo/ui/uiwx/dHtmlBox.py      2007-05-06 19:24:13 UTC (rev 3103)
@@ -31,10 +31,18 @@
                cm.dControlMixin.__init__(self, preClass, parent, properties, 
attProperties, 
                                *args, **kwargs)
                self.SetScrollRate(10, 10)
-               self.Bind(wx.html.EVT_HTML_LINK_CLICKED, self.__onWxLinkClicked)
+               if wx.VERSION >= (2, 7):
+                       self.Bind(wx.html.EVT_HTML_LINK_CLICKED, 
self.__onWxLinkClicked)
+               else:
+                       # no such event, so we need to override the 
OnCellClicked event
+                       self.OnCellClicked = self.__OnCellClicked
                self.bindEvent(dEvents.HtmlLinkClicked, self.__onLinkClicked)
 
 
+       def __OnCellClicked(self, cell, x, y, evt):
+               self.raiseEvent(dEvents.HtmlLinkClicked, 
href=cell.GetLink().GetHref())
+               
+
        def __onWxLinkClicked(self, evt):
                self.raiseEvent(dEvents.HtmlLinkClicked, 
href=evt.GetLinkInfo().GetHref())
 




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]

Reply via email to