Purpose
Creates an object of the class bGroupColumn.
Class
Type
Method
Syntax
bGroupColumn{
<oOwner>,
[<uCaption>],
[<symName>]
} Æ oGroupColumn
Arguments
<oOwner> | The owner of the group column. This is the bBrowser in which the column is to be used. |
Data Type: | Object |
uCaption | The caption of the group column. The column caption is shown in the head of the column. |
Data Type: | String | Bitmap | Icon | bCompoundValue |
<symName> | The name of the group column. The group column can be identified with the name. |
Data Type: | Symbol |
Return Value
oGroupColumn | The created object of the class bGroupColumn. |
Data Type: | bGroupColumn |
Description
bGroupColumn:Init() creates a new object of the class bGroupColumn and initializes it.
Samples
In the following sample a group column for the 2 data columns FIRSTNAME and LASTNAME in the DBServer (CUSTOMER.DBF) is created.
LOCAL odbsCUSTOMER AS DBServer
LOCAL oBrowser AS bBrowser
LOCAL oColumn AS bGroupColumn
// Create DBServer
odbsCUSTOMER := DBServer{"CUSTOMER"}
// Create browser
oBrowser := bBrowser{oOwner,;
1000,;
Point{0, 0},;
Dimension{300, 250}}
// IMPORTANT!
// Enable automatic calculation of the height
// of the column captions
oBrowser:AutoCaptionHeight := TRUE
// Set DBServer in browser and show the browser.
// -> The browser creates 2 data columns for the fields
// FIRSTNAME und LASTNAME automatically.
oBrowser:Use(odbsCUSTOMER, {#FIRSTNAME, #LASTNAME})
oBrowser:Show()
// Create a group column for the data columns
// FIRSTNAME and LASTNAME
oColumn := bGroupColumn{oBrowser, "Name", #Name)
oColumn:AddColumn(oBrowser:GetColumn(#FIRSTNAME))
oColumn:AddColumn(oBrowser:GetColumn(#LASTNAME))
// IMPORTANT!
// Recalculate the browser.
oBrowser:Recalculate()
See Also
Page url: http://www.YOURSERVER.com/index.html?bgroupcolumn_init.htm