Class XbpColumn() Foundation
Class function of the XbpColumn class
Instances of the XbpColumn class are used together with XbpBrowse objects to display tables in graphic mode. The creation of a GUI browser starts with an XbpBrowse object to which XbpColumn objects are attached or inserted. One XbpColumn object displays data of one table column.
XbpColumn objects consist of three distinct areas, each of which can be configured in detail: heading, data area, and footing. Configuration of these areas is accomplished using presentation parameters, which are specified as a two-column array. This array must be passed to either method :new() or :create(). Presentation parameters for columns can be specified already for the XbpBrowse object that is to contain XbpColumn objects. In this case, the presentation parameters are valid for all XbpColumn objects subsequently attached to the XbpBrowse object with the :addColumn() method.
To enable an XbpColumn object to display data of a table column, a data code block must be assigned to its instance variable :dataLink. The return value of this code block is displayed in the data area of the object. Data can be displayed in different visual representation, such as literal, bitmap or icon. The instance variable :type of an XbpColumn object determines how data is displayed.
The instance variables in this group configure system resources. If changes are made to these values, they must either be made before the :create() method is executed or the :configure() method must be used to activate the changes.
Depending on column type, the data code block stored in :dataLinkmust return corresponding data:
XBPCOL_TYPE_TEXT
The default value of :type (XBPCOL_TYPE_TEXT) is used to display data stored in a database or an array. In this case, :dataLinkaccesses a variable and returns its value.
XBPCOL_TYPE_BITMAP , XBPCOL_TYPE_ICON
When the constants XBPCOL_TYPE_BITMAP or XBPCOL_TYPE_ICON are specified, :dataLink must return the numeric resource ID of a bitmap or icon. Either must be linked as a resource to the EXE. Alternatively, :dataLink may return an object of the XbpBitmap or XbpIcon classes. This allows to display images loaded from disk, for example. Furthermore, if a transparent color has been defined for the bitmap object, transparent areas within the bitmap are automatically replaced with the background color defined for the individual cells in the column.
XBPCOL_TYPE_SYSICON
With XBPCOL_TYPE_SYSICON, :dataLink 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:dataLink 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.