One way is to have a hidden field the dimensions you want. Put the text into
this field first and then get the pageranges of this field. It will return a
list of character ranges, one per line, for each field (of the hidden field's
size) required.
So the number of lines will tell you how many fields, the character ranges,
what to put into them.
E.g. (Watch for line wraps)
Put mytext into field "hidden"
Put the pageRanges of field "hidden" into tranges
Put the number of lines of tranges into requiredFields
--put the code to make or display the requisite number of fields here..
--I have assumed fields are called "display1", "display2", etc
Repeat with fnum = 1 to requiredFields
Put item 1 of line fnum of tranges into tstart
Put item 2 of line fnum of tranges into tend
Put char (tstart) to (tend) of mytext into field ("display"&fnum)
Next repeat
James
_______________________________________________
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