Method XbpQuickBrowse():setColRepresentation() Foundation

Defines the visual representation of data displayed in a column.

Syntax
:setColRepresentation( <nColPos>, ;
                       <aResource>, ;
                      [<lRepaint>>] ) --> lSuccess
Parameters
<nColPos>
<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. When data in a column cell has the value <xValue>, the BITMAP resource with ID <nNormalID> is displayed in the cell. If the cell is to be highlighted, the BITMAP resource with the ID <nHiliteID> is displayed. As an alternative to specifying resource IDs, XbpBitmap or XbpIcon objects can be used instead of both <nNormalID> and <nHiliteID>. This allows the usage of various image file formats. 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>|<oNormalBmp> and <nHiliteID>|<oHiliteBmp>. 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>|<oNormalBmp> or <nHiliteID>|<oHiliteBmp> 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 constructed 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 icon object that is currently set as a column's representation is discouraged.

<lRepaint>
<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.
Return

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

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.