On 04/24/2013 01:07 PM, Shawn Blc wrote:
Is there a way to wrap text in a text entry field?

For example:
put gQ1 into field "fldQD1" wrap text -- is what I want to do.


I see the don't wrap text in the property inspector, but it's not wrapping
my text when unchecked.
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

I must be missing something:

On Linux (and I cannot quite see why this feature should differ cross-platform)
I created a stack containing one field "DTEXT"

and one button "BUTTON" containing the following script:

on mouseUp
put "my knees are so hairy they have to be shaved thrice daily" into fld "DTEXT"
end mouseUp

and, on clicking on the button, everything worked just as it should:

the text wrapped without any problems

--------------------------

So, I thought I would try something vaguely like what you are doing, by changing the button script to this:

on mouseUp
   put empty into fld "DTEXT"
   put "my knees are so hairy they have to be shaved thrice daily" into g01
   put g01 into fld "DTEXT" wrap text
end mouseUp

and, on clicking the button I got an error message; "button "Button": execution error at line 4 (Handler: can't find handler) near "wrap", char 21

mainly because writing 'wrap text' directly after 'put g01 into fld "DTEXT" ' is complete rubbish,

and I really wonder why you didn't get the same error message.

-------------------------------------

And, so to this:

on mouseUp
   put empty into fld "DTEXT"
   put "my knees are so hairy they have to be shaved thrice daily" into g01
   put g01 into fld "DTEXT"
end mouseUp

and that worked 100%

--------------------------------

things worth considering:

1. make sure the "don't wrap" is deselected in the prefs palette for your textField

and if that doesn't serve your purposes (why ever not?) you could do this:

on mouseUp
   set the dontWrap of fld "DTEXT" to true
   put empty into fld "DTEXT"
   put "my knees are so hairy they have to be shaved thrice daily" into g01
   put g01 into fld "DTEXT"
    set the dontWrap of fld "DTEXT" to false
end mouseUp

which SHOULD tell ALL of us Happy Livecoders that the true/false of 'dontWrap' is the

wrong way round !!! LOL !!!

-----------------------------

Best of luck, Richmond.


_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to