*** empty log message ***

This commit is contained in:
Joe Shochet 2001-07-27 22:52:45 +00:00
parent 0b8bfa5959
commit 6e43d6f6a2

View File

@ -72,6 +72,16 @@ class DirectScrolledList(DirectFrame):
def scrollTo(self, index): def scrollTo(self, index):
self.index = index self.index = index
# Not enough items to even worry about scrolling,
# just disable the buttons and do nothing
if (len(self["items"]) <= self["numItemsVisible"]):
self.incButton['state'] = DISABLED
self.decButton['state'] = DISABLED
# Hmm.. just reset self.index to 0 I guess
self.index = 0
return
if (self.index <= 0): if (self.index <= 0):
self.index = 0 self.index = 0
self.decButton['state'] = DISABLED self.decButton['state'] = DISABLED