Carriage Return in datagrid data
Pete
pete at mollysrevenge.com
Thu Jan 5 16:04:11 EST 2012
Thanks Mike, will do.
On Wed, Jan 4, 2012 at 5:08 PM, <mike at doub.com> wrote:
> Pete, take a look at the datagrid tutorials. If I recall correctly there
> are explanations and examples for how to manage non-fixed height rows of a
> datagrid.
>
> Sent from my BlackBerry device on the Rogers Wireless Network
>
> -----Original Message-----
> From: Pete <pete at mollysrevenge.com>
> Sender: use-livecode-bounces at lists.runrev.com
> Date: Wed, 4 Jan 2012 15:48:40
> To: How to use LiveCode<use-livecode at lists.runrev.com>
> Reply-To: How to use LiveCode <use-livecode at lists.runrev.com>
> Subject: Re: Carriage Return in datagrid data
>
> Hi Mike,
> Thanks, yes I'm familiar with using dgData - it was how the data looks in
> the datagrid that I wasn't sure of.
>
> I did an experiment with a single column datagrid, loading some text plus a
> carriage return, plus more text into via dgData. What happens is that all
> of the text after the carriage return gets lost because of the fixed row
> height of the datagrid (it's still there of course, just can't see it).
>
> On the other hand, if I use the VT character to replace the carriage
> return, the text is visible in the datagrid column (at least up to its
> width) and I see the VT character in the string.
>
> Hope that makes sense. Basically if the text is
>
> abc
> def
> ghi
>
> ....then leaving the returns in there shows me only "abc" but using the VY
> character shows me "abc<VT>def<VT>ghi" so all the data is visible. I could
> increase the row height of course but not all the rows I'm displaying will
> have carriage returns in them so would be wasting some datagrid space.
>
> Either way, I probably will convert to using dgData instead of dgText. I
> kinda prefer using dgData but it's just an extra step to convert what comes
> back from the database into an array when it's already in dgText format.
>
> Pete
>
> On Wed, Jan 4, 2012 at 2:05 PM, Michael Doub <mike at doub.com> wrote:
>
> >
> > Let say we have a variable Contacts where each line has 4 tab delimited
> > fields: RecID, Name, Age, BirthDay
> > The following builds the dgData array. The first index controls the
> order
> > of what is displayed in the datagrid.
> > If you look closely you will see that it[Counter] = pDataArray that you
> > deal with in the Row Behaviour script.
> >
> > Hope this helps,
> > Mike
> >
> >
> > Global Contacts
> > on openCard
> > local x;
> > local Counter; put 1 into counter
> > put empty into it
> > set itemdel to tab
> > repeat for each line x in Contacts
> > put item 1 of x into it[Counter]["RecID"]
> > put item 2 of x into it[Counter]["Name"]
> > put item 3 of x into it[Counter]["Age"]
> > put item 4 of x into it[Counter]["Birthday"]
> > add 1 to counter
> > end repeat
> > set the dgData of group "SetGroup" to it
> >
> >
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> >
>
>
> --
> Pete
> Molly's Revenge <http://www.mollysrevenge.com>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
--
Pete
Molly's Revenge <http://www.mollysrevenge.com>
More information about the use-livecode
mailing list