PageDown and PageUp

Aristos

Lightseeker
Joined
Dec 11, 2001
Messages
3,912
Location
Deep inside...
Problem solved. See attached IconGrid.py and IconGrid_BUG.py.

I basically replaced the values of 1 with self.numRows in the following lines:

def scrollUp(self):
# Change to self.numRows instead of 1 RJG
self.scrollPosition = self.scrollPosition - self.numRows
self.refresh()


def scrollDown(self):
# Change to self.numRows instead of 1 RJG
self.scrollPosition = self.scrollPosition + self.numRows
self.refresh()

in both files.

Works like a charm.

Please add to BUG SVN.

Chau.
 
OK, I guess you ignored me because the first solution was too simple... so I got a more elegant solution working, using some pageUp() and pageDown() unused procedures in your Icongrid_BUG.

Now, Left clicking on the arrows preserves the original format, that is scrolling up or down ONE line at a time.

Right clicking on the arrows pages Up or Down, ONE screen at a time. To do that, I had to include pageUp and pageDown in the original Icongrid (I tried to import Icongrid_BUG instead of Icongrid into the EFA, but it does not work).

Here are the files. Hopefully, you will find it worthy and include them in BUG, so that I don't have to rename a bunch of files everytime SVN gets updated.
 
OK, I guess you ignored me because the first solution was too simple.

Are you saying that we have 9 hours and 21 minutes to address your posts before you assume we're ignoring you? C'mon, give us at least 12 hours before you release the hounds. :rolleyes:

Now, Left clicking on the arrows preserves the original format, that is scrolling up or down ONE line at a time.

Right clicking on the arrows pages Up or Down, ONE screen at a time.

This is better than the first version, but I held off on adding this originally (you saw the code, but it wasn't hooked up to the interface) until I can create new buttons. The problem with right-clicking is that you'd have to read documentation to know about it. By having separate buttons, eventually you'll get curious enough to try clicking them. ;)

so that I don't have to rename a bunch of files everytime SVN gets updated.

There is an easier solution. Do and SVN checkout (not export) and make your changes. When you do SVN update to get the new code, it will merge the changes into your code. As long as we don't modify the same lines of code that you do, it will be seemless. And in that case, you'll be told that there was a conflict, your previous version is saved for reverting, and you can use the merge tool to fix the problems.
 
BTW, NikNaks made us some nice scroll up/down buttons, including page up/down and top/bottom, for the MA and EFA screens.

Not only that, but you can use the keyboard to scroll those screens: up/down arrows, page up/down, and home/end all work.
 
Back
Top Bottom