wrap text in column in data grid

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
ronniebellie
Posts: 28
Joined: Fri Jun 26, 2015 6:17 pm

wrap text in column in data grid

Post by ronniebellie » Fri Jun 26, 2015 10:39 pm

I have info from a MySQL populating a data grid with 4 columns. I need the 3rd and 4th column to wrap the text as each entry has many words. How do I get the columns to wrap the text?

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: wrap text in column in data grid

Post by MaxV » Thu Jul 09, 2015 1:54 pm

In order to wrap text, you have to change row height, here the solution: http://lessons.runrev.com/spaces/lesson ... e-Heights-
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

sritcp
Posts: 431
Joined: Tue Jun 05, 2012 5:38 pm

Re: wrap text in column in data grid

Post by sritcp » Thu Jul 09, 2015 7:06 pm

Hi Ronnie:

Please note that data grid "forms" can have varying row height but in data grid "tables" all rows have the same height (which you can set).
Thus, if you are using a table, and just a few of your rows have multi-line data, your rows will look fat (all of them) and the data grid will look strangely empty.

One way out is to have the cells display only the first line, but have a separate field that will display the entire contents of a cell when the cell is clicked on.
This way the data grid will look compact but the users will still have access to the multi-line content.

Regards,
Sri

ronniebellie
Posts: 28
Joined: Fri Jun 26, 2015 6:17 pm

Re: wrap text in column in data grid

Post by ronniebellie » Thu Jul 09, 2015 7:15 pm

Thanks for the update. I'm using a data grid table, and I'm showing just so of the first line. I've got my script set so that the rest of the data shows in a separate card. Seems to be working well.

Post Reply