How Do I Give Color To a Non Editable Column?
This lesson describes how coloring a non editable column in a Data Grid table, using the Data Grid Helper plugin.
First, drag a datagrid onto a stack and double click on it to open the Data Grid Helper (DGH) Properties Palette.
Click the "Edit..." button to open Columns Builder.
Select the column "Col1", then change it's editable property to false.
Repeat the operation for column "Col4".
Click on the "Apply" button to apply the properties modifications to the selected DataGrid (1).
Once the editable properties changed for the two columns, click on the "Grid" button, for closing the Column Buidler and going back to the Data Grid's properties.
Double-click on the Scripts topic to open the scripts list.
Then click on the "Install Script" button of the "DGH Properties" item.
Once the Script installed, the "Install Script" button, turns to grey.
The columns color properties are now available. We can select a color for the non editable columns of our data grid.
Open the color picker by clicking on the color rectangle of the "Color For Not Editable Columns" properties. (1) In this example, we have selected a yellow color. The color is immediately applied to the datagrid non editable columns.
You can remove the selected color at any moment by clicking on the "Clear" button (2).
To test how the datagrid will looking with datas, open the Contents tab of the LiveCode's Property Inspector, then input some data.
Separate data of each column by a tab, and each line by a return.
The column ink property allows to change the column transparency. In this example we chose the "addMin" value, for displaying the row alternated color.
Note that the final result for a "Column Ink" may depend of the chosen colors for the datagrids (alternate row color, column color, etc). You can try each "Column Ink" values, and then, decide what appareance is better for your datagrid.