Method XbpBrowse():addColumn() Foundation
Attaches a column (XbpColumn object) to an XbpBrowse object.
:addColumn( <oXbpColumn> ) --> oXbpColumn
or
:addColumn( <bDataLink>, ;
[<nWidth>], ;
[<cHeading|nHeadID>], ;
[<cFooting|nFootID>], ;
[<nType>] ) --> oXbpColumn
Constant | Description |
---|---|
XBPCOL_TYPE_BITMAP | The column displays bitmaps |
XBPCOL_TYPE_ICON | The column displays icons |
XBPCOL_TYPE_SYSICON | The column displays system-icons |
XBPCOL_TYPE_FILEICON | The column displays normal file-icons |
XBPCOL_TYPE_FILEMINIICON | The column displays small file-icons |
XBPCOL_TYPE_TEXT *) | The column displays textual data |
|
The method returns the attached XbpColumn object.
The method :addColumn() attaches a table column to an XbpBrowse object. Display of columns is done by XbpColumn objects. The method must receive either a configured XbpColumn object or a data code block which returns data to be displayed in a column. In this case the XbpBrowse object creates the XbpColumn object and attaches it to itself.
Parameters for width, heading, footing and column type are optional. The type determines whether a column is to display text, icons or bitmaps. Depending on column type, the data code block must return corresponding data:
XBPCOL_TYPE_TEXT
The default value of <nType> (XBPCOL_TYPE_TEXT) is used to display data stored in a database or an array. In this case, <bDataLink>accesses a variable and returns its value.
XBPCOL_TYPE_BITMAP , XBPCOL_TYPE_ICON
When the constants XBPCOL_TYPE_BITMAP or XBPCOL_TYPE_ICON are specified, <bDataLink> must return the numeric resource ID of a bitmap or icon. Either must be linked as a resource to the EXE.
XBPCOL_TYPE_SYSICON
With XBPCOL_TYPE_SYSICON, <bDataLink> must return a constant prefixed with XBPSTATIC_SYSICON_. These constants are defined in XBP.CH.
XBPCOL_TYPE_FILEICON , XBPCOL_TYPE_FILEMINIICON
An XbpColumn object displays file names as symbols when either constant XBPCOL_TYPE_FILEICON or XBPCOL_TYPE_FILEMINIICON defines the column type. The<bDataLink> code block must return a fully-qualified file name including drive and path as character string.
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.