Alternating Colors for List Box and Table Rows (NFS 65216)

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.

For a ListBox control, if the value of the alternatingRowBackColorCount property is:

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:

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.