Purpose
List of color conditions that are to be considered when drawing the selector cells.
Class
Type
Access
Data Type
Description
Provides a list of color conditions that selector cells can be drawn in different foreground and background colors. The list of color conditions is an object of the class bColorConditionList. New color conditions can be added by bBrowser:SelectorColorCondition:Add().
All selector cells for which no color conditions exist will be drawn with the foreground and background color with the methods bBrowser:GetSelectorForeground()and bBrowser:GetSelectorBackground().
So that changes that were made in the list of color conditions can be shown immediately, all data must be re-read with the method bBrowser:Refresh().
Samples
In the following sample a color condition is defined in which all customers born befor 1960 are displayed with a red background.
LOCAL odbsCUSTOMER AS DBServer
LOCAL oBrowser AS bBrowser
LOCAL oColorCondition AS bColorCondition
// create browser and show it
odbsCUSTOMER := DBServer{"CUSTOMER"}
oBrowser := bBrowser{oOwner,;
1000,;
Point{0, 0},;
Dimension{300, 250}}
oBrowser:Use(odbsCUSTOMER)
oBrowser:Show()
// define color condition and add it to the selector
oColorCondition := bColorCondition{"Server:BIRTHDAY<CToD('01/01/60')",;
odbsCUSTOMER,;
,;
Brush{Color{COLORRED}}}
oBrowser:SelectorColorCondition:Add(oColorCondition)
// IMPORTANT!!!
// -> Reread data
oBrowser:Refresh()
See Also
bBrowser:GetSelectorBackground()
bBrowser:GetSelectorColorSpec()
bBrowser:GetSelectorForeground()
Page url: http://www.YOURSERVER.com/index.html?bbrowser_selectorcolorconditio.htm