Navigation:  Classes > bBrowser >

bBrowser:ColorCondition

Print this Topic    Previous pageReturn to chapter overviewNext page

Purpose

List of color conditions that are to be considered when drawing rows.

Class

bBrowser

Type

Access

Data Type

bColorConditionList

Description

Provides a list of color conditions that rows can be drawn in with 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:ColorCondition:Add(). Whether color conditions are defined can be checked with the method bBrowser:ExistColorConditions().

 

All rows for which no color conditions exist will be drawn with the foreground and background color of the bBrowser:DataView object.

 

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 before 1960 are displayed with a red foreground.

 

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 browser

oColorCondition := bColorCondition{"Server:BIRTHDAY<CToD('01/01/60')",;

                                                                       odbsCUSTOMER,;

                                                                       Color{COLORRED}}

oBrowser:ColorCondition:Add(oColorCondition)

 

// IMPORTANT!!!

// -> Reread data

oBrowser:Refresh()

See Also

bBrowser:DataView

bBrowser:ExistColorConditions()

bBrowser:Refresh()

bDataColumn:ColorCondition

 


Page url: http://www.YOURSERVER.com/index.html?bbrowser_colorcondition.htm