dabo Commit
Revision 5778
Date: 2010-04-11 13:11:27 -0700 (Sun, 11 Apr 2010)
Author: Nate
Trac: http://trac.dabodev.com/changeset/5778
Changed:
U trunk/dabo/ui/uiwx/dGrid.py
Log:
The wx function GetScrollRange returns 1 when the scrollbar is present, not
zero.
I updated the GetScrollbarVisible method to look for a 1 when the platform is
GTK.
Diff:
Modified: trunk/dabo/ui/uiwx/dGrid.py
===================================================================
--- trunk/dabo/ui/uiwx/dGrid.py 2010-04-05 12:50:03 UTC (rev 5777)
+++ trunk/dabo/ui/uiwx/dGrid.py 2010-04-11 20:11:27 UTC (rev 5778)
@@ -2337,9 +2337,9 @@
def isScrollBarVisible(self, which):
whichSide = {"h": wx.HORIZONTAL, "v":
wx.VERTICAL}[which[0].lower()]
sr = self.GetScrollRange(whichSide)
- if self.Application.Platform == "Win":
+ if self.Application.Platform in ("Win", "GTK"):
# For some reason, GetScrollRange() returns either 1 or
101 when the scrollbar
- # is not visible under Windows. Under OS X, it returns
0 as expected.
+ # is not visible under Windows or GTK. Under OS X, it
returns 0 as expected.
return sr not in (1, 101)
return bool(sr)
_______________________________________________
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]