Purpose
Defines a group column in the bBrowser.
Class
bGroupColumn
Properties
ColumnCount | (Access) |
ColumnList | (Access) |
ColumnOpenCount | (Access) |
Methods
Inherits From
Inherited By
<No descendants>
Description
An arbitrary number of columns can be added to a group column. The added columns form a logical group. For example, the two data columns "FIRSTNAME" and "LASTNAME" could be added to the group column "Name" (see figure below).
Both data columns and other group columns can be added to a group column. In this manner, complex groups can be created.
The visible data columns and group columns are contained in column bands in the bBrowser. The column bands manage the different levels of the columns.
A group column has a caption and a footer which extend over all added sub columns. The width of the group column is determined by the individual widths of the sub columns. If the group column is moved, then all sub columns are also moved. The sub columns also can be moved within the group column. At this it can be controlled with a flag whether the column may be moved only within the group column or also out of the group column.
The width of a group column can be changed with the mouse. In this case the changed width is divided evenly on all sub columns. If the width of a sub column is changed with the mouse then the width of the group column is adjusted automatically, too.
Important notes!
The sub columns must be adjacent in the list of the open columns. In addition, all sub columns must be either in the frozen or in the dynamic data area.
So that the captions and footer of the group columns can be displayed, the access bBrowser:AutoCaptionHeight and bBrowser:AutoFooterHeight must be set to TRUE.
After new columns were assigned to the group columns with the method bGroupColumn:AddColumn() the bBrowser must be recalculated by the call of the method bBrowser:Recalculate().
Samples
In the sample below the two data columns "FIRSTNAME" and "LASTNAME" are added to the group column "NAME".
METHOD PostInit() CLASS myDataWindow
LOCAL odbsCUSTOMER AS DBServer
// Create and show a browser
odbsCUSTOMER := DBServer{"CUSTOMER"}
SELF:oBrowser := bBrowser{oOwner,;
1000,;
Point{0, 0},;
Dimension{300, 250}}
SELF:oBrowser:Use(odbsCUSTOMER, , {#FIRSTNAME, #LASTNAME})
SELF:oBrowser:Show()
// Create group column
ogcName := bGroupColumn{SELF:oBrowser, "Name", #Name}
ogcName:AddColumn(SELF:oBrowser:GetColumn(#FIRSTNAME))
ogcName:AddColumn(SELF:oBrowser:GetColumn(#LASTNAME))
// IMPORTANT!
// AutoCaptionHeight must be activated
SELF:oBrowser:AutoCaptionHeight := TRUE
// IMPORTANT!
// The browser must recalculated
SELF:oBrowser:Recalculate()
See Also
Page url: http://www.YOURSERVER.com/index.html?bgroupcolumn.htm