Re: iOS scrolling text field. How?
Posted: Fri May 11, 2012 8:10 pm
You know this seems so much easier for situations where you have static text to display! I do this on all my Information screens of my apps.
I use the iphoneControlCreate "multiline" command.
I don't even need to put the name of the control in a local variable and it works like a charm. Just grab an image and set it to the location you would like your scrolling text to show up at, name it "InfoRect" and make it invisible. Have your field "info" contain the text content to scroll and make it invisible too. Then the script is short and sweet.
on opencard
if the environment is "mobile" then
if "testinput" is among the lines of iphoneControls() then
inputDelete
end if
iphoneControlCreate "multiline", "testinput"
iphoneControlSet "testinput", "rect", the rect of image "InfoRect"
iphoneControlSet "testinput", "visible", true
iphoneControlSet "testinput", "fontsize", "15"
iphoneControlSet "testinput", "text", field "info"
iphoneControlSet "testinput","editable","false"
end if
end opencard
on closeCard
if the environment is "mobile" then iphoneControlDelete "testinput"
end closeCard
I use the iphoneControlCreate "multiline" command.
I don't even need to put the name of the control in a local variable and it works like a charm. Just grab an image and set it to the location you would like your scrolling text to show up at, name it "InfoRect" and make it invisible. Have your field "info" contain the text content to scroll and make it invisible too. Then the script is short and sweet.
on opencard
if the environment is "mobile" then
if "testinput" is among the lines of iphoneControls() then
inputDelete
end if
iphoneControlCreate "multiline", "testinput"
iphoneControlSet "testinput", "rect", the rect of image "InfoRect"
iphoneControlSet "testinput", "visible", true
iphoneControlSet "testinput", "fontsize", "15"
iphoneControlSet "testinput", "text", field "info"
iphoneControlSet "testinput","editable","false"
end if
end opencard
on closeCard
if the environment is "mobile" then iphoneControlDelete "testinput"
end closeCard