first steps in iOS, native scroll a datagrid
Klaus major-k
klaus at major-k.de
Wed Jun 5 08:29:55 EDT 2013
Hi friends,
I am currently making my first serious stps in iOS and cannot get my DG to scroll?
I am sure I am missing something obvious, but cannot find a solution.
In any case the DG does not scroll :-/
Any hints much appreciated, thanks!
Here my card script:
####################################################
local sScrollerID
on preopencard
lock screen
if the environment <> "mobile" then
exit preOpenCard
end if
MobileControlCreate "scroller"
put the result into sScrollerId
MobileControlSet sScrollerId, "rect", (the rect of grp "Datagrid 1")
put the width of grp "Datafgrid 1" into tWidth
put the dgFormattedheight of grp "Datagrid 1" into tHeight
MobileControlSet sScrollerId, "contentRect", (0,0,tWidth,tHeight)
MobileControlSet sScrollerId, "visible", "true"
MobileControlSet sScrollerId, "canBounce", "true"
MobileControlSet sScrollerId, "pagingEnabled", "false"
MobileControlSet sScrollerId, "canScrollToTop", "false"
end preopencard
on scrollerDidScroll OffsetX, OffsetY
lock screen
## Need only VScroll
## set the dghScroll of grp "DataGrid 1" to OffsetX
set the dgvScroll of grp "DataGrid 1" to OffsetY
##set the Scroll of grp "DataGrid 1" to OffsetY
unlock screen
end scrollerDidScroll
#####################################################
Best
Klaus
--
Klaus Major
http://www.major-k.de
klaus at major-k.de
More information about the use-livecode
mailing list