Smooth scrolling text field
Posted: Sat Dec 31, 2011 9:23 pm
I'm working on the iPhone version of our "HAT" app, and taking advantage of some of the native iOS stuff. For one field where users type text in, I've switched from the traditional ugly motif LiveCode field to the iOS multiline, and it is AWESOME. Everything works flawlessly.
So now I'm working on the "about" screen, which is a big long scrolling text field. I'd like to use the iOS multiline object, but it needs to be read only. However, nothing I've tried makes my multiline object read-only.
Here's the code:
This creates an iOS multiline text area that is drawn exactly where I want it on the screen, and then puts the contents of our about field into the text area. That works perfectly. But the user can edit it. I want it to be read only. I tried setting the "editing" property and the "editable" property but they do nothing. I'd love to be told my syntax is wrong, get the correct syntax, and have this work!
Before anyone suggests using the scroller object instead, I know I can do that. But here's the thing - we're doing this for the retina display iPhone, and the about text is in size 22 point font, so it's still kinda small on the retina screen. And when you use the scroller idea, as is used in the example stack, the scrolling is NOT SMOOTH. You don't notice it so much on a picture, but on a small font on the retina display you really notice it. On the other hand, the multiline scrolling is flawless.
Any help appreciated.
So now I'm working on the "about" screen, which is a big long scrolling text field. I'd like to use the iOS multiline object, but it needs to be read only. However, nothing I've tried makes my multiline object read-only.
Here's the code:
Code: Select all
iphoneControlCreate "multiline", "daScroll"
# set the native text input field to the size and position of the graphic input rectangle
iphoneControlSet "daScroll",the rect of image "my border"
iphoneControlSet "daScroll", "visible", true
iphoneControlSet "daScroll", "text", field "about us content"
iphoneControlSet "editing","read-only"
iphoneControlSet "editable","read"
Before anyone suggests using the scroller object instead, I know I can do that. But here's the thing - we're doing this for the retina display iPhone, and the about text is in size 22 point font, so it's still kinda small on the retina screen. And when you use the scroller idea, as is used in the example stack, the scrolling is NOT SMOOTH. You don't notice it so much on a picture, but on a small font on the retina display you really notice it. On the other hand, the multiline scrolling is flawless.
Any help appreciated.