Navigation:  Classes > bBrowserColumn >

bBrowserColumn:DataView

Print this Topic    Previous pageReturn to chapter overviewNext page

Purpose

An object of class bViewStyle, for drawing the column values.

Class

bBrowserColumn

Type

Access / Assign

Data Type

bViewStyle

Description

With the DataView the graphic representation of the column values can be affected. It can set the font, the alignment, the foreground and the background color and the grid.

 

If the access contains NULL_OBJECT, when drawing the column values the settings of the DataView from the bBrowser are used.

 

So that changes at this access are shown also in the browser, all values of the column must be re-read by the method bBrowser:Refresh(). This is only necessary if the column is inside the visible area of the browser.

Samples

In the following sample a browser is created in which all columns are drawn with a red foreground and a yellow background. Only the second column is drawn with a blue background.

 

LOCAL odbsCUSTOMER AS DBServer

LOCAL oBrowser     AS bBrowser

LOCAL oColumn      AS bBrowserColumn

 

// create and show browser

odbsCUSTOMER := DBServer{"CUSTOMER"}

oBrowser := bBrowser{oOwner,;

                                         1000,;

                                         Point{0, 0},;

                                         Dimension{300, 250}}

oBrowser:Use(odbsCUSTOMER)

oBrowser:Show()

 

// all columns with red text and yellow background

oBrowser:DataView := bViewStyle{Color{COLORRED},;

                                                          Brush{Color{COLORYELLOW}})

 

// second column with blue background

oColum := oBrowser:GetOpenColumn(2)

oColumn:DataView := bViewStyle{, Brush{Color{COLORBLUE}}}

 

// Important

// -> refresh data

oBrowser:Refresh()

See Also

bBrowser:DataView

bBrowser:IsColumnVisible()

bBrowser:Redraw()

bBrowser:Refresh()

bBrowserColumn:Alignment

bBrowserColumn:Background

bBrowserColumn:CaptionView

bBrowserColumn:FooterView

bBrowserColumn:Foreground

bBrowserColumn:Grid

bTextStyle:Font

 


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