Classes

Method XbpColumn():new() Foundation

Creates instances of the XbpColumn class.

Syntax
XbpColumn():new( [<oParent>], ;
                 [<oOwner>], ;
                 [<aPos>], ;
                 [<aSize>], ;
                 [<aPresParam>], ;
                 [<lVisible>] ) --> oXbpColumn
Parameters
<...>
The parameter interface of the :new() method has been chosen to be consistent with all other Xbase Parts. However, since an XbpColumn object is only useful when it is contained in an XbpBrowse object, the parameters <oParent>, <oOwner>, <aPos>, <aSize>and <lVisible> have no meaning for the creation of the object. Any value passed for one of these parameters is ignored or overwritten when the XbpColumn object is attached to an XbpBrowse object by the :addColumn() method. Only the fifth parameter <aPresParam>is used to configure the appearance of an XbpColumn object.
<aPresParam>
A two dimensional array can be specified for <aPresParam>. Refer to Generic presentation parametersfor a detailed explanation.
In addition to the generic presentation parameters, an XbpColumn object recognizes special presentation parameters to configure the visual appearance of the displayed cells (see the description below).
Return

The class method :new() returns an XbpColumn object.

Description

An XbpColumn object allows the separate configuration of heading area, data area and footing area. The configuration of each area is accomplished with three different sets of define constants used to identify a particular presentation parameter. These constants are found in the XBP.CH file and are listed in the following tables:

Configuration of the heading area of a column
Constant Description
XBP_PP_COL_HA_CAPTION Text displayed in the heading
XBP_PP_COL_HA_FGCLR Foreground color
XBP_PP_COL_HA_BGCLR Background color
XBP_PP_COL_HA_COMPOUNDNAME Font compound name
XBP_PP_COL_HA_HEIGHT Height of the heading in pixel
XBP_PP_COL_HA_ALIGNMENT Alignment of text
XBP_PP_COL_HA_FRAMELAYOUT Frame type

Configuration of the data area of a column
Constant Description
XBP_PP_COL_DA_FGCLR Foreground color
XBP_PP_COL_DA_BGCLR Background color
XBP_PP_COL_DA_HILITE_FGCLR Foreground color for highlight
XBP_PP_COL_DA_HILITE_BGCLR Background color for highlight
XBP_PP_COL_DA_COMPOUNDNAME Font compound name
XBP_PP_COL_DA_ROWWIDTH Width of the frame in pixel
XBP_PP_COL_DA_ROWHEIGHT Height of the frame in pixel
XBP_PP_COL_DA_CELLWIDTH Width of the cell in pixel
XBP_PP_COL_DA_CELLHEIGHT Height of the cell in pixel
XBP_PP_COL_DA_CHARWIDTH Width of a cell in characters
XBP_PP_COL_DA_CELLALIGNMENT Alignment of a cell within frame
XBP_PP_COL_DA_ROWSEPARATOR Separating line between rows
XBP_PP_COL_DA_COLSEPARATOR Separating line between columns
XBP_PP_COL_DA_FRAMELAYOUT Frame type
XBP_PP_COL_DA_CELLFRAMELAYOUT Border of cell within frame
XBP_PP_COL_DA_HILITEFRAMELAYOUT Frame type of highlighted cell

Configuration of the footing area of a column
Constant Description
XBP_PP_COL_FA_CAPTION Text displayed in the footing
XBP_PP_COL_FA_FGCLR Foreground color
XBP_PP_COL_FA_BGCLR Background color
XBP_PP_COL_FA_COMPOUNDNAME Font compound name
XBP_PP_COL_FA_HEIGHT Height of the footing in pixel
XBP_PP_COL_FA_ALIGNMENT Alignment of text
XBP_PP_COL_FA_FRAMELAYOUT Frame type

Caption: A character string can be displayed in both heading and footing area. If *CAPTION is not specified, a column does not have a heading or a footing.

Colors: Values for foreground and background colors (constants *FGCLR and *BGCLR) are #define constants prefixed with GRA_CLR_ or XBPSYSCLR_.

Font: For *COMPOUNDNAME, a character string that contains the compound name of a font must be used. By default, the font of the parent (XbpBrowse) is used.

Height and width: The default value for presentation parameters defining height or width (constants *HEIGHT and *WIDTH) is XBP_AUTOSIZE. This means: an XbpColumn object calculates height and width from the data to be displayed. Height and width can be specified with numeric values indicating number of pixels. An exception is XBP_PP_COL_DA_CHARWIDTH which allows the definition of the width as 'number of characters'.

Alignment: Display of text in the heading and footing area is left aligned by default. Default alignment in the data area depends on the data type of displayed values. Numeric values are right aligned, logical values are centered and the rest is left aligned. Default values for *ALIGNMENT are changed with constants listed in the next table. These constants can be added to define horizontal and vertical alignment:

Constants for alignment
Constant Description
XBPALIGN_TOP Alignment at the top
XBPALIGN_LEFT Alignment on the left
XBPALIGN_BOTTOM Alignment at the bottom
XBPALIGN_RIGHT Alignment on the right
XBPALIGN_HCENTER Horizontally centered
XBPALIGN_VCENTER Vertically centered

Separator lines: Columns are displayed without separating lines by default. Constants that can be used as values for the presentation parameters *SEPARATOR are listed below:

Constants for row and column separators
Constant Description
XBPCOL_SEP_NONE *) No separating line
XBPCOL_SEP_LINE Normal line
XBPCOL_SEP_DASHED Dashed line
XBPCOL_SEP_DOTTED Dotted line
  1. default value

Column separators are not displayed on the Windows platform.

Frames: All presentation parameters which end with *FRAMELAYOUT configure borders or frame types of the cells displayed in a column. The constants listed in the next table can be added to define the general frame layout:

Constants to configure the layout of frames
Constant Description
XBPFRAME_NONE No frame
XBPFRAME_RECT Frame drawn using system background color (not filled)
XBPFRAME_BOX Box filled with background or highlight color
XBPFRAME_THICK Frame or box has wider frame (combine with XBPFRAME_RECT or XBPFRAME_BOX)

The rectangle frame type (XBPFRAME_RECT) can optionally be modified by adding one of the modifiers in the following table:

Constants to modify frames of type (XBPFRAME_RECT)
Constant Description
XBPFRAME_RAISED Frame is raised
XBPFRAME_RECESSED Frame is recessed
XBPFRAME_DASHED *) Frame has dashed lines
XBPFRAME_DOTTED Frame has dotted lines
  1. Supported under OS/2 only

The filled frame type (XBPFRAME_BOX) can optionally be modified by adding using the following frame modifiers:

Constants to modify frames of type XBPFRAME_BOX
Constant Description
XBPFRAME_RAISED Box has raised frame
XBPFRAME_RECESSED Box has recessed frame

The XbpColumn class supports presentation parameters to specify the frame type separately for each of the following display elements:

- Default frame layout used with XbpBrowse (XBP_PP_COL_xx_FRAMELAYOUT)
Column area Default frame layout
:Heading XBPFRAME_RAISED+XBPFRAME_BOX+XBPFRAME_THICK
:DataArea XBPFRAME_BOX+XBPFRAME_RAISED
:Footing XBPFRAME_RAISED+XBPFRAME_BOX+XBPFRAME_THICK

- Default cell frame layout used with XbpBrowse (XBP_PP_COL_xx_CELLFRAMELAYOUT)
Column area Default frame drawn around individual cells
:Heading XBPFRAME_NONE
:DataArea XBPFRAME_BOX+XBPFRAME_RAISED
:Footing XBPFRAME_NONE

- Default highlighted cell frame layout used with XbpBrowse (XBP_PP_COL_xx_HILITEFRAMELAYOUT)
Column area Default highlight frame
:Heading XBPFRAME_NONE
:DataArea XBPFRAME_BOX
:Footing XBPFRAME_NONE

The XBP_PP_COL_xx_CELLFRAMELAYOUT presentation parameter defines how the interior of a cell is drawn in a column object. Therefore, it is recommended to use a filled frame type with this presentation parameter. Otherwise, the background color specified for the column object may not be visible. In addition, the highlight mark may not be removed when a cell is unhighlighted.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.