Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
07-24-2012 07:53 AM
As you have noted, the code supplied does not match your specifications in that there is no scrollChangeListener involved.
But the code supplied by pp demonstrates an alternative approach. In it, you keep tabs on the currently in focus Cell, and then set the scroll positions appropriately. So you are actually moving the Cells rather than reacting to the user moving the cells.
You say that the scroll change listener 'lags' which is the problem you have with my option (c). Can you give us a quick summary of your test environment (OS, number of cells etc). I will try to find out if I can get it working quicker. As noted, it is something I have always wondered about, I might have a go to see if I can figure out what I would actually do!
07-24-2012 08:58 AM
07-25-2012 01:31 AM
Well Peter, i have around 9 columns and around 200 rows. Iam using the Blackberry Eclipse plugin. The OS is BB6.0.
Iam not sure you got what i meant about the scroll delay. So, il explain again.
Its like if you set the scroll manually of the table with fixed columns the same as the scroll of table with data in the scroll change listener of table with data, then the scroll of the table with fixed columns lags the scroll of the table with data.
07-25-2012 06:52 AM
Thank you for the help Peter and pp. I found the solution. Instead of setting the scroll of the table with fixed row/col in the onScrollChange of table with data, i had to do it in the paint of the table with data. It still results in a very very small lag. But it is not visible for small movements.
07-25-2012 07:11 AM
I am a little worried about doing this, because you are effectively updating a Ui component while updating another Ui component and the order in which things happen will be set by the framework and not by you. So at some stage RIM might break your code by doing things in a different order. So I suggest that you test this over the range of OS's you intend to support.
In addition, I would recommend that you keep a track of the last position you set and only do the setScroll when it changes so you minimize the overhead.
That said, it is an interesting idea and I applaud your efforts trying to find a solution for yourself. Well done!