Hi,
the lesson you looked at is for custom controls, it is not what you are looking for. As others have pointed out, you need to look at mobileControlCreate. Here is some sample code, you would most likely run it on the card script. When you leave the card you want to delete the scroller, otherwise it might mess up your interface on the next card. ask if you need more info. There are also some livecode lessons out there:
http://lessons.livecode.com/m/4069/l/94 ... ll-a-field Code: Select all
on opencard
-- create native scroller
if environment() is "mobile" then
// Set the area of the scroller
put the rect of group "steplist" into tempscrollerrect
// Create the scroller control
mobileControlCreate "scroller", "steplist"
// Set the properties of the scroller
mobileControlSet "steplist", "rect", tempscrollerrect
mobileControlSet "steplist", "contentRect", tempscrollerrect
mobileControlSet "steplist", "visible", true
mobileControlSet "steplist", "scrollingEnabled", true
mobileControlSet "steplist", "vIndicator", true
mobileControlSet "steplist", "hIndicator", false
mobileControlSet "steplist", "vscroll", 0
end if
end opencard
on scrollerDidScroll hOffset, vOffset
// When the user scrolls move the displayed content
set the vScroll of group "steplist" to vOffset
end scrollerDidScroll
When I used it the first time it felt rather cumbersome, but I somehow got used to it, still it feels like a workaround for me and a more streamlined way of doing it would be appreciated.