Scroller bug?

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Scroller bug?

Post by JosepM » Sun Jan 23, 2011 9:39 pm

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

RickD
Posts: 31
Joined: Thu Feb 11, 2010 5:47 pm

Re: Scroller bug?

Post by RickD » Tue Feb 08, 2011 5:12 pm

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

Post Reply