So lets stay that I have a control called "Foo"  and I am using a datagrid 
named "PeopleList"

I normally would do the following to set up the scroller:
      iphoneControlCreate "scroller"
      put the result into sScrollerId
      iphoneControlSet sScrollerId, "rect", the rect of group "PeopleList"
      put the rect of group "PeopleList" into temp
      put the dgFormattedHeight of group "PeopleList" into item 4 of temp
      iphoneControlSet sScrollerId, "contentRect", temp

on scrollerDidScroll pOffsetX, pOffsetY
   lock screen;  set the dgVScroll of group "PeopleList" to pOffsetY;  unlock 
screen
end scrollerDidScroll

Your saying that I should include both "Foo" and "PeopleList" together inside 
of an encompassing group, let's call it "Boo"
Still use the rect of the group "PeopleList" for the scroller rect but set the 
content rect to 
(the dgFormattedHeight of group "PeopleList" + the height of group "foo".

Are you suggesting that it is necessary to switch between scrolling 
"PeopleList" and "Boo' with a single scroller?
  
on scrollerDidScroll pOffsetX, pOffsetY
   lock screen;
   if pOffset > the height of group "Foo" then
            set the vScroll of group "Boo" to the height of group "Foo"
           set the dgVScroll of group "PeopleList" to pOffsetY - the height of 
group "Foo";
    else
           set the dgVScroll of group "PeopleList" to 0
           set the vScroll of group "Boo" to pOffset
    unlock screen
end scrollerDidScroll

Am I understanding this correctly?

-= Mike


On 2012-01-04, at 9:19 AM, Mark Schonewille wrote:

> Hi Mike,
> 
> Just put the control at the top of the group and set the scroll of the group 
> to the the height of the control. When the user pulls down the group, the 
> scroll value will be 0 and that's when you know an action needs to be 
> performed.
> 
> --


_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to