datagrid scrolling and layermodes

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
cusingerBUSCw5N
Posts: 339
Joined: Wed Jul 11, 2012 9:24 pm

datagrid scrolling and layermodes

Post by cusingerBUSCw5N » Fri Jan 11, 2013 6:37 am

I have a series of datagrids - mostly with text but a couple with images as well. The finger scrolling for mobile devices is still quite awkward (I had earlier posts trying to figure it out)...Although it works, you have to play around with it to get it to start (which my users won't know to do)- and then it is jumpy - based on the size of the item in the datagrid. Anyway, it's kind of a mess.

I saw an article on creating a scrolling group with pictures and images and it has made me think I'll try again.
It has

Code: Select all

set the layermode of group "gallery" to "scrolling"
and then has set the compositor type....and other things that aren't part of my current code.

Since a datagrid is a group, can I just substitute my datagrid name into this code?

The article is http://lessons.runrev.com/s/lessons/m/4 ... chitecture.

Or is there a better way to get datagrids to scroll nicely on a mobile device (android)?

Thanks!

cusingerBUSCw5N
Posts: 339
Joined: Wed Jul 11, 2012 9:24 pm

Re: datagrid scrolling and layermodes

Post by cusingerBUSCw5N » Fri Jan 11, 2013 6:55 am

I'm still looking into this - but as usual, I am stupid. The datagrid has a layer mode in it already - with the choices, scrolling, dynamic or static. Haven't tried it yet - (all of mine are on static) but seems the first step.

cusingerBUSCw5N
Posts: 339
Joined: Wed Jul 11, 2012 9:24 pm

Re: datagrid scrolling and layermodes

Post by cusingerBUSCw5N » Fri Jan 11, 2013 7:10 am

Livecode is always presenting new challenges.

I changed all my datagrid layer modes to scrolling and then put the following code in the stackscript

Code: Select all

  if the platform is "iphone" then
   set the compositorType of this stack to "opengl"
   else
        set the compositorType of this stack to "software"
  end if
   set the compositorTileSize of this stack to 32
   set the compositorCacheLimit of this stack to (16 * 1024 * 1024)
It certainly looks like my datagrids are scrolling better now. However, now I have a little blue box at the top of my screen...quite lovely, but it doesn't belong there.

could be a basic tilesize???? Anyway - how do I get rid of it? From reading about the layermode - I need compositortype not to be empty... I took this code off the example that I found (link in earlier post)...

cusingerBUSCw5N
Posts: 339
Joined: Wed Jul 11, 2012 9:24 pm

Re: datagrid scrolling and layermodes

Post by cusingerBUSCw5N » Fri Jan 11, 2013 7:26 am

I don't know why...but the blue box disappeared. So life is good. :D

Adrian
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 79
Joined: Wed Jul 11, 2012 5:03 pm

Re: datagrid scrolling and layermodes

Post by Adrian » Mon Jan 14, 2013 1:34 pm

Doesn't using acceleratedRendering negate the need to worry about things like compositorType?

Cheers,

Adrian

Post Reply