Is there anyway to limit the length of each line of a scrolling field. I want the data to wrap after 50 characters (even if ENTER is not selected).
How would I do this? I tried the code below and it is not working (this was a total guess of how I thought it would work...so don't laugh if I am way off the mark).
on keyDown theKey
if the length of me = 50 then
put field "Notes" & CRLF into field "Notes"
pass keyDown
else
pass keyDown
end if
end keyDown
Scrolling Field Question
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 10049
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
I've a lot of reading ahead of me this morning so I haven't thought about your code too deeply, but I think there's just one too many pass statements in there.
Offhand (read, "untested" <g>) I think you should be able to get away with this:
on keyDown k
if len(me) < 50 then pass keyDown
end keyDown
Let me know if that doesn't do what you need and we'll come up with something that does.
Offhand (read, "untested" <g>) I think you should be able to get away with this:
on keyDown k
if len(me) < 50 then pass keyDown
end keyDown
Let me know if that doesn't do what you need and we'll come up with something that does.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn