JADE now provides the following four Integer value properties that control whether the rows in list boxes and tables are drawn with alternating background colors.
ListBox class alternatingRowBackColor property, which can be set in the JADE Painter and in runtime logic. The default value is Azure (a new global constant in the ColorConstants category).
ListBox class alternatingRowBackColorCount property, which can be set in the JADE Painter and in runtime logic. The default value is zero (0).
JadeTableSheet class alternatingRowBackColor property, which can be set only by runtime logic. The default value is Azure (a new global constant in the ColorConstants category).
JadeTableSheet class alternatingRowBackColorCount property, which can be set only by runtime logic. The default value is zero (0).
For a ListBox control, if the value of the alternatingRowBackColorCount property is:
Less than or equal to zero (0), the background color of each list box entry defaults to the value of the backColor property of the ListBox control. The alternatingRowBackColor property value is ignored.
Greater than zero (0), for each alternatingRowBackColorCount property visible entry, the background color defaults to the value of the alternatingRowBackColor property.
For example, if the count is 2, the first, third, fifth, and so on visible entries in the list default to the value of the backColor property of the ListBox control, while the second, fourth, sixth, and so on visible entries default to the value of the alternatingRowBackColor property.
If the value of the itemBackColor property of the list item is specifically set and it is not #800000000 (that is, transparent), the default value of the list box item is ignored and the value of the itemBackColor property is used.
For a Table control, if the value of the alternatingRowBackColorCount property is:
Less than or equal to zero (0), the background color of each non‑fixed cell defaults to the value of the backColor property of the sheet, or of the table itself if the value of the sheet is not specifically set. The alternatingRowBackColor property value is ignored.
Greater than zero (0), for each visible alternatingRowBackColorCount non‑fixed row and non‑fixed cell, the background color defaults to the value of the alternatingRowBackColor property.
For example, if the count is 2, the first, third, fifth, and so on non‑fixed rows and the non‑fixed cells in that row default to the value of the backColor property of the sheet, while the second, fourth, sixth, and so on non‑fixed rows and the non-fixed cells in that row default to the value of the alternatingRowBackColor property.
If the value of the backColor property of a cell, row, or column is specifically set and it is not #800000000 (that is, transparent), the default value of the cell is ignored and the specific value of the backColor property is used.
Note that when the list box or table is scrolled, the colors do not move with a row. The color scheme is applied to the rows, starting with the first visible non‑fixed row; for example:
table1.accessSheet(1).alternatingRowBackColorCount := 2; table1.accessSheet(1).alternatingRowBackColor := Azure;
listbox1.alternatingRowBackColorCount := 3; listbox1.alternatingRowBackColor := DarkGray;
In addition, the Window sheet of the Preferences dialog now contains the Show Alternating Row BackColor check box, which is unchecked by default. When you check this check box, tables and list boxes in browsers (for example, a hierarchy browser such as the Class Browser) in the JADE development environment set the value of the alternatingRowBackColorCount property to 2.
The value of the alternatingRowBackColor property value defaults to Azure, but you can change it by selecting the required color displayed in the second column of global color constants in the table at the upper‑left of the Window sheet of the Preferences dialog. These values are saved in your user profile when you extract your user preferences to a file and they are restored when you reload your preferences.
The alternatingRowBackColor and alternatingRowBackColorCount properties have been added to the JadeSkinListBox and JadeSkinTable classes. You can set these values in a ListBox and Table skin using the functionality provided by the JadeSkinMaintence form. If the value of the alternatingRowBackColorCount property is zero (0), the value of the alternatingRowBackColor property is ignored and does not apply.
The skin settings are also ignored if logic specifically sets the value of the alternatingRowBackColorCount property of a list box or table to a value greater than zero (0). See also "Table Row Alternating Colors (NFS 65216)" and "Specifying Some Skin Table Colors (NFS 65152)" under "JadeSkinControl Subclasses", later in this document.