Method XbpMultiCellGroup():setColRepresentation() Foundation

Defines the visual representation of data displayed in a column.

:setColRepresentation( <nColPos>, ;
                       <aResource>, ;
                      [<lRepaint>>] ) --> lSuccess
<nColPos> is a numeric value indicating the ordinal position of the column whose data representation is to be defined.
<aResource> := { <xValue>, <nNormalID>|<oNormalImg>, <nHiliteID>|<oHiliteImg> }
The parameter is a three element-array which defines a visual representation for a specific value. Whenever data in a column cell has the value <xValue>, the BITMAP resource with ID <nNormalID> is displayed in the cell. If the cell is highlighted, the BITMAP resource with the ID <nHiliteID> is displayed. As an alternative to using resource IDs and Windows Bitmaps, XbpBitmap or XbpIcon objects can be assigned to <oNormalImg> and <oHiliteImg>. This allows the usage of other image formats such as PNG or JPG. Furthermore, if a transparent color has been specified for the bitmap object, transparent areas within the bitmaps are automatically replaced with the background color defined for the respective cell.
The value -1 is valid for both <nNormalID>|<oNormalImg> and <nHiliteID>|<oHiliteImg>. In this case, nothing is displayed in the cell.
Once a visual representation is defined, it can be voided by specifying NIL for either <nNormalID>|<oNormalImg> or <nHiliteID>|<oHiliteImg> or both.

If XbpBitmap or XbpIcon objects are used instead of resource IDs to define a cell's visual representation, either :load() or :loadFile() must have been called previously. For bitmaps built in memory, method :make() must have been used. Furthermore, it is recommended that separate bitmap or icon objects are used for <oNormalImg> and <oHiliteImg> if these represent different images. Additionally, calling :load(), :loadFile() or :make() on a bitmap or an icon object that is currently set as a column's representation is discouraged.

<lRepaint> specifies whether or not the column is immediately re-displayed when the method returns. The default value is .T. (true) and the column is automatically re-displayed.

The method returns .T. (true) if the data representation is set, or .F. (false) in case of a failure.


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.