Datagrid click and set background color for a column
JosepM
jmyepes at mac.com
Wed Jun 23 13:31:29 EDT 2010
Thanks.
And how to change these color in function of the value of other col in the
same row? Well, I know how to get the value but the problem is that I don't
know the name of the column, so the array is created in function of the
position.
Sample:
put 1 into myArray[1]["Value 1"]
put 2 into myArray[2]["Value 2"]
put 3 into myArray[3]["Value 3"]
put 4 into myArray[4]["Value 4"]
These values aren't visibles into the datagrid
put "red" into myArray[1]["Color 1"]
put "red" into myArray[2]["Color 2"]
put "green" into myArray[3]["Color 3"]
put "black" into myArray[4]["Color 4"]
I need change the color of "Value X" in function of the value of "Color X"
How to get the columnIndex into the FillData?
I must to show visually values using a multidimension array, so what is
better?
1) Create one array with X dimensions and load all into the datagrid,
showing only one column and the others are not visibles and changing in
function of these others values. Columns needed 40 visible to the user by 20
rows, and 80 aditional rows no visibles to the user. So 120 columns by 20
rows. I say this for performance, and inside of each of visibles cells I
have some images that must be visibles or not in function of the data of
others cols.
2) Create one array with 1 dimension and putting the values separated with
"#" (for example) and into the FillData using "setitemdel" to get the values
and perform the operations.
put "1#Red#128,128,50" into myArray[1]["Col 1"]
put "2#Red#128,50,50" into myArray[1]["Col 1"]
put "3#Green#50,128,50" into myArray[1]["Col 1"]
put "4#Yellow#32,32,50" into myArray[1]["Col 1"]
Thoughts?
Salut,
Josep
--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Datagrid-click-and-set-background-color-for-a-column-tp2265290p2265951.html
Sent from the Revolution - User mailing list archive at Nabble.com.
More information about the use-livecode
mailing list