Purpose
The caption of the column.
Class
Type
Access / Assign
Data Type
String | Bitmap | Icon | bCompoundValue
Description
The column caption is shown in the head of the column. The column caption can be either a string, a bitmap object, an icon object or a bCompoundValue object.
Column captions of multiple rows are supported. For this the individual rows must be separated with the constant CRLF. If in the bBrowser the access bBrowser:AutoCaptionHeight does not contain the value TRUE, the access bBrowser:CaptionHeight must be used to the caption height.
After a new value for the column caption is set, the column width can be recalculated with the method bDataColumn:CalculateWidth(). So that changes at this access are also shown in the browser, the column must be redrawn with the method bBrowser:Redraw(). 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 that for the column "INVOICENO" a caption is defined with 2 rows.
LOCAL odbsINVOICE AS bDBServer
LOCAL oBrowser AS bBrowser
LOCAL oColumn AS bDataColumn
// create and show browser
odbsINVOICE := bDBServer{ "INVOICE" }
oBrowser := bBrowser{oOwner,;
1000,;
Point{0, 0},;
Dimension{300, 250}}
oBrowser:Use(odbsINVOICE)
oBrowser:Show()
// set caption with 2 rows for column "INVOICENO"
oColum := oBrowser:GetOpenColumn(#INVOICENO)
oColumn:Caption := "Invoice"+CRLF+"No"
// set the height of column caption in browser
oBrowser:CaptionHeight := 32
See Also
Page url: http://www.YOURSERVER.com/index.html?bdatacolumn_caption.htm