DataGrid: setting dgProps["column widths"]

klaus at major.on-rev.com klaus at major.on-rev.com
Thu May 7 08:45:59 EDT 2009


Hi Trevor,

using 3.5 gm 2:

 From the docs:
...
column widths
- Allows you to set all column widths at once. Line delimited list of  
integers.
...

A couple of qustions:

1.
I checked the 10,000,000 lines of script of btn "DataGrid" in your  
library :-)
and it looks like this should be a COMMA separated list, right?
Just like:
..
put the dgProps["column widths"] of grp "DataGrid"
..
-> 120,100,110,50 = COMMA separated list, should be consistent I think.

2.
...
set the dgProps["column widths"] of grp "DataGrid" to "100,100,100,100"
## Given there are 4 columns in the datagrid
...
But that does not work, the columns do not resize.

3.
...
set the dgProps["column widths"] of grp "DataGrid" to ("100" & CR &  
"100" & CR & "100" & CR & "100")
## Given there are 4 columns in the datagrid
...
Doesn't work either, but if my assumption 1 is correct, it should at  
least give an error?!

4.
What will (should) happen if we supply too few/many items in the list  
like:
...
set the dgProps["column widths"] of grp "DataGrid" to "100,100"
## Given there are more or less than 2 columns in the datagrid
...


Best

Klaus

--
Klaus Major
http://www.major.on-rev.com
klaus at major.on-rev.com






More information about the use-livecode mailing list