Automatic new line in text field
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Automatic new line in text field
I have a text field with multiple lines. I want the cursor to go to the beginning of the next line when it reaches the end of current line. How to do this? At the moment, when the cursor reaches the end of a line, it just keeps going beyond the bound, I and can't find something in the prop settings to solve this problem. Thank you....
Open the property inspector of your field and uncheck the Don't Wrap checkbox. You can also use this syntax:
set the dontWrap of fld "Your Field" to false
Best regards,
Mark
set the dontWrap of fld "Your Field" to false
Best regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Hi,
it will only break the line if the contents of the line is not a single word. As soon as there is a space in it it will work, but I think that is not what you are after...
What you want might be possible to script though...
A quick start out of the top of my head:
In the fields script
Hope that helps,
Malte
it will only break the line if the contents of the line is not a single word. As soon as there is a space in it it will work, but I think that is not what you are after...
What you want might be possible to script though...
A quick start out of the top of my head:
In the fields script
Code: Select all
on keyDown theKey
if the formattedWidth of me > the width of me then
put cr before char -1 of line -1 of me
put theKey after line -1 of me
select after line -1 of me
else
pass keydown
end if
end keyDown
Malte
Hi Tony,
It is not naive at all, in fact your idea is very good and it is very understandable that you don't immediately think of the formattedwidth when you're new to Rev.
Enjoy the Revolution.
Mark
It is not naive at all, in fact your idea is very good and it is very understandable that you don't immediately think of the formattedwidth when you're new to Rev.
Enjoy the Revolution.
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode