Flow text to multiple fields

Jan Schenkel janschenkel at yahoo.com
Wed Oct 23 08:55:01 CDT 2002


--- Bill Vlahos <bvlahos at mac.com> wrote:
> I have some text which isn't very wide so I want to
> flow it from one 
> field to another (and others in a chain) but I don't
> see how to do it 
> in Revolution. It needs to be one contiguous flow so
> that users can 
> insert information anywhere and the text will
> automatically reflow.
> 
> As simple example of what I want to do is to have
> two columns (fields) 
> on a card. Text is entered into the first column and
> when it gets to 
> the bottom of the column it simply flows to the next
> one.
> 
> Thanks,
> Bill Vlahos
> 


Hi Bill,

Off the top of my head, you might want to take a look
at the 'formattedHeight' property. The change the
script of the first field to something like:

on keyDown pWhichKey
  send "checkMyHeight" to me in 5 milliseconds
  pass keyDown
end keyDown

on checkMyHeight
  if the formattedHeight of me > the height of me then
    put line -1 of me & return before field "overFlow"
    delete line -1 of me
    select after line 1 of field "overFlow"
  end if
end checkMyHeight

This suggestion needs a bit more work and testing, but
might just do the trick or put you on the right track
(I hope).

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/



More information about the use-livecode mailing list