List field line-up

Ken Ray kray at sonsothunder.com
Wed Jul 24 22:01:01 EDT 2002


Nicholas,

Rev has fields with tab stops in them, so all you need to do is set the
tabStops of the field to a set value (Properties palette, Behavior tab, "Tab
stop every ___ pixels"). Then, dump in your tab-separated data into the
field and every column will line up. You'll have to play a bit to get long
data items from overlapping into the next field, but I've heard this is
fixed in the next version of Rev (it will truncate columns at the tabstops).

Here's a short script that can do it all for you (once the field is set up):

  on mouseUp
    answer file "Import file:"
    if it <> "" then
      put url ("file:" & it) into field 1
    end if
  end mouseUp

Hope this helps,

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/

----- Original Message -----
From: "Feasey, Nicholas" <NFeasey at utpress.utoronto.ca>
To: <use-revolution at lists.runrev.com>
Sent: Wednesday, July 24, 2002 7:07 PM
Subject: List field line-up


> I'm having a problem when I add fields from a file into a field.
>
> I have, say, name, address and phone number.  The text file uses a TAB as
> the delimiter.
> I load it into the list and everything loads just fine.
>
> However, I can't get the fields to line up.  I'm not sure what the issue
is.
>
> So, if I have the following fields with each item separated by TAB:
>
> Joe Smith 123 Somestreet 416-999-9999
> Nicholas Feasey 7 MyStreet 416-888-8888
>
> ...when it gets into the list field it doesn't line up (in the example
> above, for obvious reasons).
>
> Is there some way to set the fields to a maximum length so that all fields
> are equal then when it is brought into the list all of the fields are
lined
> up?
>
> Can I put each item into an individual field and have the three fields
> (Name, Address, Phone Number) scroll in sync?
>
> I guess what I'm saying is I need some advice from a more experienced
> Revolution coder which can give me and others some tips on how to work
with
> scrolling text fields.  Especially on how to work with fields to get them
to
> line up in lists, etc.
>
> Any assistance, as always, is greatly appreciated.
>
> N
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list