Hi,
I started testing the scroller to scroll a field with text.
I detected that when I drag to the bottom, the text exceeds the rect of the scroller, the same if I drag to the top. I'm doing something wrong or is a bug?
local sScrollerId
local sBottomScrollRect
on preopencard
iphoneControlCreate "scroller"
put the result into sScrollerId
put the rect of field "label1" into tRect
put item 4 of tRect into sBottomScrollRect
iphoneControlSet sScrollerId, "rect", tRect
put the formattedHeight of field "label1" into tHeight
put the width of field "label1" into tWidth
iphoneControlSet sScrollerId, "contentRect", (0, 0, tWidth, tHeight)
iphoneControlSet sScrollerId, "visible", "true"
iphoneControlSet sScrollerId, "canBounce", true
iphoneControlSet sScrollerId, "declerationRate", fast
iphoneControlSet sScrollerId, "scrollingEnabled", true
iphoneControlSet sScrollerId, "canScrollToTop", true
iphoneControlSet sScrollerId, "delayTouches", true
iphoneControlSet sScrollerId, "hscroll", 0
iphoneControlSet sScrollerId, "vscroll", 0
set the hScroll of fld "label1" to 0
set the vScroll of fld "label1" to 0
end preopencard
on scrollerDidScroll pOffsetX, pOffsetY
lock screen
set the hScroll of fld "label1" to pOffsetX
set the vScroll of fld "label1" to pOffsetY
unlock screen
end scrollerDidScroll
Scroller bug?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Scroller bug?
Hi JosepM,
I cut and pasted your code and tested it with 4.6 DP-4 and it works fine for me.
I guess I don't really understand understand your issue, but if you want to explore this further please attach either a picture of your problem or a sample stack.
Cheers
I cut and pasted your code and tested it with 4.6 DP-4 and it works fine for me.
I guess I don't really understand understand your issue, but if you want to explore this further please attach either a picture of your problem or a sample stack.
Cheers