easy text wrapping question.

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
biffbaxter
Posts: 4
Joined: Sat Feb 07, 2009 7:37 am

easy text wrapping question.

Post by biffbaxter » Sun Jul 26, 2009 2:08 am

I cannot seem to get text to wrap in any of the fields I have tried. whether it is scrolling field, or text entry field, I have played with all of the various geometry and size options, I have checked and unchecked the "Dont wrap" box in properties, but I cannot for the life of me get text to wrap.

I am taking the input from one field and putting it into another field, and the one input field may be longer as it is a variable length text entry (that a user keys in). But when it gets put into another field I need to make sure it wraps so it is all visible. currently I cannot seem to get that to happen.

what properties or items do I need to set to get a field to limit to say 80 characters wide and wrap text?

I am running rev studio 3.5 eval.

Regards,
Ron

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Sun Jul 26, 2009 7:40 am

Is your target field a list field or a table field by any chance? Neither of those will allow wrapping of text.

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Post by BvG » Sun Jul 26, 2009 10:02 am

"don't wrap" changes the behaviour of text when a line is longer then the field is wide. so rev by itself will only wrap text if the text would overflow the field on the right.

If you want a specific amount of chars, and then wrap it independently of field size, you should look into the formattedwith property, and use a monotype font. then you can check wetter a line is wider then a specific amount of pixels, and then insert a return there.

Note that rev used to have problems with wrapping non-latin scriptures that don't use spaces, like japanese or korean. but i think this was fixed some when. Still, keep in mind that (latin) text has no spaces in it, then it won't automatically wrap.
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

biffbaxter
Posts: 4
Joined: Sat Feb 07, 2009 7:37 am

text wrap

Post by biffbaxter » Sun Jul 26, 2009 2:19 pm

Hi guys thanks for the responses.

1. Its not a list field or table field.
2. I cannot seem to get the dont wrap to function no matter what.

Here is what I do, I just drag and drop a plain text field onto a blank new card. I define its size and try to limit geometry, etc. and the text will just continue to flow off to the right. (whether its centered, left or right justified) I have tried multiple ways of getting it to wrap with plain old vanilla fonts of various and well know type. (ie. courier, arial, times, tahoma, etc).

Thanks for the advice on formatwidth property, I will look into that today to see if I can get it to effect any sort of change. But so far this one simple item is a show stopper.

- Ron

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Sun Jul 26, 2009 2:47 pm

Dear biffbaxter,

Very long words and url's, for instance, don't get wrapped. Perhaps that's your problem?

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

Post Reply