dabo Commit
Revision 4144
Date: 2008-06-17 07:01:33 -0700 (Tue, 17 Jun 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/4144
Changed:
U trunk/dabo/ui/uiwx/dPanel.py
Log:
Added pageUp, pageDown, pageLeft and pageRight methods to dScrollPanel.
Diff:
Modified: trunk/dabo/ui/uiwx/dPanel.py
===================================================================
--- trunk/dabo/ui/uiwx/dPanel.py 2008-06-17 12:44:01 UTC (rev 4143)
+++ trunk/dabo/ui/uiwx/dPanel.py 2008-06-17 14:01:33 UTC (rev 4144)
@@ -231,6 +231,30 @@
self.Scroll(x, y-amt)
+ def pageLeft(self):
+ self.pageHorizontally(-1)
+ def pageRight(self):
+ self.pageHorizontally(1)
+ def pageHorizontally(self, direction):
+ """Scroll horizontally one 'page' width."""
+ sz = self.GetScrollPageSize(wx.HORIZONTAL)
+ if sz:
+ x,y = self.GetViewStart()
+ self.Scroll(x + (direction * sz), y)
+
+
+ def pageUp(self):
+ self.pageVertically(-1)
+ def pageDown(self):
+ self.pageVertically(1)
+ def pageVertically(self, direction):
+ """Scroll vertically one 'page' height."""
+ sz = self.GetScrollPageSize(wx.VERTICAL)
+ if sz:
+ x,y = self.GetViewStart()
+ self.Scroll(x, y + (direction * sz))
+
+
def _getChildren(self):
ret = super(dScrollPanel, self)._getChildren()
return [kid for kid in ret
_______________________________________________
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/[EMAIL PROTECTED]