dabo Commit
Revision 2326
Date: 2006-10-09 17:55:37 -0700 (Mon, 09 Oct 2006)
Author: ed
Changed:
U trunk/dabo/ui/uiwx/dPanel.py
Log:
I've been having lots of problems getting dScrollPanel obejcts to show their
scroll bars when I want them to. This still isn't perfect, but at least I'm now
able to get the scrollbars to show up when they are needed.
Diff:
Modified: trunk/dabo/ui/uiwx/dPanel.py
===================================================================
--- trunk/dabo/ui/uiwx/dPanel.py 2006-10-10 00:54:00 UTC (rev 2325)
+++ trunk/dabo/ui/uiwx/dPanel.py 2006-10-10 00:55:37 UTC (rev 2326)
@@ -104,6 +104,7 @@
if "style" not in kwargs:
kwargs["style"] = wx.TAB_TRAVERSAL
cm.dControlMixin.__init__(self, preClass, parent, properties,
*args, **kwargs)
+ self.SetScrollRate(10, 10)
# self.SetScrollbars(10, 10, -1, -1)
@@ -136,6 +137,8 @@
def _setHorizontalScroll(self, val):
self._horizontalScroll = val
self.EnableScrolling(self._horizontalScroll,
self._verticalScroll)
+ rt = self.GetScrollPixelsPerUnit()
+ self.SetScrollRate({True:rt[0], False:0}[val], rt[1])
def _getVerticalScroll(self):
@@ -144,6 +147,8 @@
def _setVerticalScroll(self, val):
self._verticalScroll = val
self.EnableScrolling(self._horizontalScroll,
self._verticalScroll)
+ rt = self.GetScrollPixelsPerUnit()
+ self.SetScrollRate(rt[0], {True:rt[1], False:0}[val])
Children = property(_getChildren, _setChildren, None,
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev