HA! No comment!gpb01 wrote:+1Jellicle wrote:Just checked and double-checked - setting the visible of the scroller control deactivates it here
Exactly the same here ...
Livecode 6.1.0 build 2005 - Commercial Edition
Guglielmo

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
HA! No comment!gpb01 wrote:+1Jellicle wrote:Just checked and double-checked - setting the visible of the scroller control deactivates it here
Exactly the same here ...
Livecode 6.1.0 build 2005 - Commercial Edition
Guglielmo
Code: Select all
global scrollid
on preOpenCard
# default state upon opening
hide group "scrollGroup"
hide grp "ClientOff"
show btn "ClientOn"
if environment() is not "mobile" then exit preOpenCard
if scrollID is not empty then
iphoneControlSet scrollid, "visible", true
exit preOpenCard
end if
put the rect of fld 1 into fldRect
put the formattedHeight of fld 1 into fldHeight
put the width of fld 1 into fldWidth
set the height of fld 1 to fldHeight
set the unboundedVScroll of group "scrollGroup" to true
iphoneControlCreate "scroller"
put the result into scrollid
iphoneControlSet scrollid, "rect", fldRect
iphoneControlSet scrollid, "contentRect", (0, 0, fldWidth, fldHeight)
iphoneControlSet scrollid, "visible", true
iphoneControlSet scrollid, "canBounce", true
iphoneControlSet scrollid, "decelerationRate", slow
iphoneControlSet scrollid, "scrollingEnabled", true
iphoneControlSet scrollid, "canScrollToTop",true
iphoneControlSet scrollid, "canCancelTouches",true
iphoneControlSet scrollid, "delayTouches", true
iphoneControlSet scrollid, "vIndicator", true
iphoneControlSet scrollid, "indicatorStyle", black
iphoneControlSet scrollid, "indicatorInsets", "0,0,0,0"
iphoneControlSet scrollid, "hscroll", 0
iphoneControlSet scrollid, "vscroll", 0
repeat with count = 1 to the number of lines of fld 1
set the textShift of line count of fld 1 to - 10
end repeat
put the vScroll of group "scrollGroup" into fld 3
end preOpenCard
on closeCard
if environment() is not "mobile" then exit closeCard
iphoneControlSet scrollid, "visible", false
set the vscroll of group "ScrollGroup" to 0
iphoneControlSet scrollId, "vscroll", 0
end closeCard
on scrollerBeginDrag
set the hilitedLine of fld 1 to empty
put empty into fld 2
end scrollerBeginDrag
on scrollerScrollToTop
iphoneControlSet scrollId, "vscroll", 0
end scrollerScrollToTop
on scrollerDidScroll hOffset, vOffset
set the vScroll of group "scrollGroup" to vOffset
put vOffset into fld 3
end scrollerDidScroll
Code: Select all
iphoneControlSet scrollid, "visible", false
Code: Select all
##!!!!!
global scrollid
on mouseup
iphoneControlSet scrollid, "visible", false
end mouseup
Code: Select all
global scrollid
on preOpenCard
hide group "scrollGroup"
disable group "scrollGroup"
hide grp "ClientOff"
show btn "ClientOn"
if environment() is not "mobile" then exit preOpenCard
if scrollID is not empty then
iphoneControlSet scrollid, "visible", true
exit preOpenCard
end if
put the rect of fld 1 into fldRect
put the formattedHeight of fld 1 into fldHeight
put the width of fld 1 into fldWidth
set the height of fld 1 to fldHeight
set the unboundedVScroll of group "scrollGroup" to true
iphoneControlCreate "scroller"
put the result into scrollid
iphoneControlSet scrollid, "rect", fldRect
iphoneControlSet scrollid, "contentRect", (0, 0, fldWidth, fldHeight)
iphoneControlSet scrollid, "visible", true
iphoneControlSet scrollid, "canBounce", true
iphoneControlSet scrollid, "decelerationRate", slow
iphoneControlSet scrollid, "scrollingEnabled", true
iphoneControlSet scrollid, "canScrollToTop",true
iphoneControlSet scrollid, "canCancelTouches",true
iphoneControlSet scrollid, "delayTouches", true
iphoneControlSet scrollid, "vIndicator", true
iphoneControlSet scrollid, "indicatorStyle", black
iphoneControlSet scrollid, "indicatorInsets", "0,0,0,0"
iphoneControlSet scrollid, "hscroll", 0
iphoneControlSet scrollid, "vscroll", 0
repeat with count = 1 to the number of lines of fld 1
set the textShift of line count of fld 1 to - 10
end repeat
put the vScroll of group "scrollGroup" into fld 3
end preOpenCard
on closeCard
if environment() is not "mobile" then exit closeCard
iphoneControlSet scrollid, "visible", false
set the vscroll of group "ScrollGroup" to 0
iphoneControlSet scrollId, "vscroll", 0
end closeCard
on scrollerBeginDrag
set the hilitedLine of fld 1 to empty
put empty into fld 2
end scrollerBeginDrag
on scrollerScrollToTop
iphoneControlSet scrollId, "vscroll", 0
end scrollerScrollToTop
on scrollerDidScroll hOffset, vOffset
set the vScroll of group "scrollGroup" to vOffset
put vOffset into fld 3
end scrollerDidScroll
Code: Select all
global scrollid
on mouseUp
iphoneControlSet scrollid, "visible", true
show grp "ClientOff"
hide me
show group "scrollGroup" with visual effect dissolve very fast
end mouseUp
Code: Select all
global scrollid
on mouseUp
iphoneControlSet scrollid, "visible", false
hide group "scrollGroup"
show btn "ClientOn"
hide me
end mouseUp
Code: Select all
on mouseup
if environment() <> "mobile" then
exit mouseup
end if
## NOW do your MOBILE thing:
iphoneControlSet scrollid, "visible", true
...