momentum scrolling a dg
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
momentum scrolling a dg
Does anyone have some example code for momentum scrolling a datagrid? Scrolling by finger isn't bad, though its a little rough looking, but haven't got a momentum system to work yet.
Suggestions?
Suggestions?
Re: momentum scrolling a dg
If you have Mobgui you can use the Android scroller there, its the only thing I've found that works well for me.
Its simply a group, you then put your data grid inside it and make the data grid resize to its full contents. The Mobgui control then takes care of the scrolling, data grid is just used for layout and input.
Its simply a group, you then put your data grid inside it and make the data grid resize to its full contents. The Mobgui control then takes care of the scrolling, data grid is just used for layout and input.
Re: momentum scrolling a dg
Hmm might have to try this.
For datagrids with small enough amounts of data it should be great. Is there a problem when using datagrids that have LOTS of rows? Just a curiosity question. For my current project this should be dandy.
Thanks!
For datagrids with small enough amounts of data it should be great. Is there a problem when using datagrids that have LOTS of rows? Just a curiosity question. For my current project this should be dandy.
Thanks!
andyh1234 wrote:If you have Mobgui you can use the Android scroller there, its the only thing I've found that works well for me.
Its simply a group, you then put your data grid inside it and make the data grid resize to its full contents. The Mobgui control then takes care of the scrolling, data grid is just used for layout and input.
Re: momentum scrolling a dg
Scrolling performance has never been a problem for me, the issue with the larger data grids (in my cases 200 lines+) has been the time it takes for the data grid to be populated as I understand it only usually populates the rows it considers visible, but by setting its size to show everything, everything has to be populated.
It really depends on how many elements there are as to how long this takes, but the key for me has been to make the search dynamic and limit the results sent to populate the data grid. Anything under 100 lines and the grid propagates instantly.
If you like, drop me a pm and Ill send you a link to an app I've written so you can try it on your device and see how the scroller is working compared to what you are currently using.
It really depends on how many elements there are as to how long this takes, but the key for me has been to make the search dynamic and limit the results sent to populate the data grid. Anything under 100 lines and the grid propagates instantly.
If you like, drop me a pm and Ill send you a link to an app I've written so you can try it on your device and see how the scroller is working compared to what you are currently using.
Re: momentum scrolling a dg
That would be cool, and yes please. I think for my current project the dg will always be well under 200 lines. Future projects maybe not (and yeah thats my concern with larger data-sets. Looking forward to trying your app!
Did they turn PM's back on?
Did they turn PM's back on?
-
- VIP Livecode Opensource Backer
- Posts: 135
- Joined: Mon Jul 31, 2006 1:39 am
- Location: New Zealand, Australia, Germany, Japan
- Contact:
Re: momentum scrolling a dg
You can also use the normal iosScroller to control a datagrid.
Just have to use the particular datagrid-specific attributes (like dgFormattedHeight etc) in order to set it up ok.
Then just catch the scroll events as usual and modify the DG VScroll and so on.
HTH
cheers
Alan
Just have to use the particular datagrid-specific attributes (like dgFormattedHeight etc) in order to set it up ok.
Then just catch the scroll events as usual and modify the DG VScroll and so on.
HTH
cheers
Alan
Re: momentum scrolling a dg
This won't work on android though right? (the native ios scroller)
-
- VIP Livecode Opensource Backer
- Posts: 135
- Joined: Mon Jul 31, 2006 1:39 am
- Location: New Zealand, Australia, Germany, Japan
- Contact:
Re: momentum scrolling a dg
Right - sorry, didn't realise you were looking for an Android solution.
Re: momentum scrolling a dg
Np, didn't know the ios scroller stuff was implemented so ive got it filed away now in my noggin for future use, so thx much for pointing it out to me. I'll need it at some point!
strongbow wrote:Right - sorry, didn't realise you were looking for an Android solution.