IOS scroller bounce unhides another control
Michael Doub
mike at doub.com
Wed Jan 4 16:15:03 EST 2012
Sorry Mark I am confused. Which group? We have 3 groups in play. PeopleList(datagrid), Foo(the hidden control) and Boo the group that includes both Foo and PeopleList.
If we are setting the HScroll of Boo, how does the datagrid scroll?
Are you saying that Foo is somehow added to the PeopleList datagrid?
Do you happen to have a simple example?
On 2012-01-04, at 3:32 PM, Mark Schonewille wrote:
> Hi Mike,
>
> If you set the height of the field to it's formattedHeight then you only need to scroll the group.
>
> --
> Best regards,
>
> Mark Schonewille
>
> Economy-x-Talk Consulting and Software Engineering
> Homepage: http://economy-x-talk.com
> Twitter: http://twitter.com/xtalkprogrammer
> KvK: 50277553
>
> Become our partner in sales http://qery.us/1bq Start selling Color Converter today. 20% commission!
>
> On 4 jan 2012, at 20:36, Michael Doub wrote:
>
>> 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
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list