Page 1 of 1

Program a Soft Return

Posted: Fri May 22, 2015 8:09 pm
by quailcreek
Hi,
I'm doing this in iOS but I don't think that should make a difference. What I want to do is replace a cr with a soft cr in a container. Right now I'm just replacing the cr with a space but that doesn't follow the users intent. I've looked at shiftKey in the dictionary but I'm not sure. Thanks for any help.

Code: Select all

replace cr with space in tUserNotes

Re: Program a Soft Return

Posted: Sat May 23, 2015 12:26 am
by mwieder
OK - I'll bite... what's a 'soft cr'?

Re: Program a Soft Return

Posted: Sat May 23, 2015 12:38 am
by quailcreek
I think it's also called a sticky return. I MS work you hold down the shift key and press return. I allows the text lines to stay in one paragraph.

Re: Program a Soft Return

Posted: Sat May 23, 2015 12:47 am
by FourthWorld
In LiveCode, when a field's dontWrap is false (the default) 0x11 can be used to create the appearance of a new line without creating a new paragraph (v5.5.4 and later).

Re: Program a Soft Return

Posted: Sat May 23, 2015 1:02 am
by quailcreek
Hi Richard,
The don't wrap is false on the fld. I'm not sure what you mean by 0x11 can be used. Is that ASCII?

Re: Program a Soft Return

Posted: Sat May 23, 2015 1:44 am
by FourthWorld
Yes. In LiveCode you can get that character with numToChar(11).

Re: Program a Soft Return

Posted: Sat May 23, 2015 2:04 am
by quailcreek
Thank you, Richard. That worked perfectly... as I'm sure you knew it would. ;-)