I have 2 questions about data grids. Any help would be appreciated!
1. Is it possible for a data grid table to word wrap? I'm building a bunch of tables and the column names are sometimes long. It would be great for the column headers to word wrap and grow taller automatically. Any ideas?
2. Is there a function to determine the best width for a data grid table column? In Java there's a FontMetrics object that can tell you how many pixels wide a string will be. I'd like to find a function like this in LiveCode to determine how to set column widths.
Thanks so much,
Ritch
2 Data Grid questions
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: 2 Data Grid questions
Hi Ritch,
1. sorry, no idea.
2. you can check "the formattedwidth of fld X"!
I think this is what you are looking for.
Best
Klaus
1. sorry, no idea.
2. you can check "the formattedwidth of fld X"!
I think this is what you are looking for.
Best
Klaus
-
- Posts: 101
- Joined: Wed Dec 22, 2010 8:17 pm
Re: 2 Data Grid questions
Hi Ritch, re: 1...
I'm assuming you're displaying the data for the user (pretty safe bet). The answer will depend on how you've designed your app: You've got a field for the data and a separate fld for the header? Or flds for the column headers and each and every column? (my personal fav). If you're trying to show everything in a single fld you might have problems, especially if you want to do anything more than display the data i.e. let the user select rows or records.
But all are do-able.
Steve
I'm assuming you're displaying the data for the user (pretty safe bet). The answer will depend on how you've designed your app: You've got a field for the data and a separate fld for the header? Or flds for the column headers and each and every column? (my personal fav). If you're trying to show everything in a single fld you might have problems, especially if you want to do anything more than display the data i.e. let the user select rows or records.
But all are do-able.
Steve