Method XbpCellGroup():new() Foundation

Creates an instance of the XbpCellGroup class.

Syntax
XbpCellGroup():new( [<oParent>] , ;
                    [<oOwner>] , ;
                    [<aPos>] , ;
                    [<aSize>] , ;
                    [<aPresParam>], ;
                    [<lVisible>]    ) --> oXbpCellGroup
Parameters
<oParent>
The parent for the XbpCellGroup object can be optionally specified using the parameter <oParent>. By default <oParent> is the active window (the return value of SetAppWindow()). If the default is used, the active window must be an XbpCrt window. If the active window is an XbpDialog window, the drawing area of the window must be specified for <oParent>. The drawing area is referenced using the instance variable oXbpDialog:drawingArea.
<oOwner>
<oOwner> optionally specifies the owner for the XbpCellGroup object. By default, <oOwner> is the same as <oParent>.
<aPos> := { nX, nY }
The optional parameter <aPos> can be used to specify the position where the XbpCellGroup object is displayed. By default, this parameter contains the array {0,0}. This specifies the position for the lower left corner of the XbpCellGroup object. The first element contains the x coordinate and the second element contains the y coordinate. The coordinates are relative to the coordinate system of <oParent>.
<aSize> := { nXsize, nYsize }
The parameter <aSize> optionally specifies the size of the XbpCellGroup object. <aSize> must be an array containing two elements. The first element specifies the dimension in the x direction (width) and the second element specifies the dimension in the y direction (height).
<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 XbpCellGroup object recognizes special presentation parameters to configure the visual appearance of the displayed cells (see the description below).
<lVisible>
The parameter <lVisible> determines whether the XbpCellGroup object is visible immediately after the call to the method :create(). By default <lVisible> is .T. (true) and the Xbase Part is displayed after :create() is executed. This default behavior can be suppressed by specifying the value .F. (false) for the parameter <lVisible>. In this case, the object must be explicitly displayed using the :show() method.
Return

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

Description

The appearance of an XbpCellGroup object can be modified in greater detail using special presentation parameters found in the XBP.CH file.

#define constants for presentation parameters
Constant Description
XBP_PP_HILITE_FGCLR Foreground color for highlight
XBP_PP_HILITE_BGCLR Background color for highlight
XBP_PP_CGRP_ROWWIDTH Width of the frame in pixel
XBP_PP_CGRP_ROWHEIGHT Height of the frame in pixel
XBP_PP_CGRP_CELLWIDTH Width of the cell in pixel
XBP_PP_CGRP_CELLHEIGHT Height of the cell in pixel
XBP_PP_CGRP_CELLALIGNMENT Alignment of a cell within frame
XBP_PP_CGRP_HSEPARATOR Horizontal separator line
XBP_PP_CGRP_VSEPARATOR Vertical separator line
XBP_PP_CGRP_FRAMELAYOUT Frame type
XBP_PP_CGRP_CELLFRAMELAYOUT Border of cell within frame
XBP_PP_CGRP_HILITEFRAMELAYOUT Frame type of highlighted cell

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

Height and width: The default value for presentation parameters defining height or width (constants *HEIGHT and *WIDTH) is XBP_AUTOSIZE. This means: an XbpCellGroup object calculates height and width from the font and its reference string. Height and width can be specified with numeric values indicating number of pixels.

Alignment: Display of textual data in the cells is left aligned by default. The value for *ALIGNMENT is 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: cells are displayed without separating lines by default. Constants that can be used as values for the presentation parameters *SEPARATOR are listed below:

Constants for horizontal and vertical separators
Constant Description
XBPLINE_NONE *) No separating line
XBPLINE_NORMAL Normal line
XBPLINE_DASHED Dashed line
XBPLINE_DOTTED Dotted line
  1. default value

Frames: All presentation parameters ending with *FRAMELAYOUT configure borders, or frame types, of cells displayed in a cell group. Constants of the next table can be added to define a frame layout:

Constants to configure the layout of frames
Constant Description
XBPFRAME_NONE *) No frame
XBPFRAME_RECT Frame with no foreground
XBPFRAME_BOX Frame with foreground
XBPFRAME_RAISED Raised frame
XBPFRAME_RECESSED Recessed frame
XBPFRAME_THICK Thick frame
XBPFRAME_DASHED Dashed frame
XBPFRAME_DOTTED Dotted frame
  1. default value

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.