Method XbpBrowse():setColumn() Foundation

Replaces a column (XbpColumn object) within an XbpBrowse object.

Syntax
:setColumn( <nColPos>, <oNewXbpColumn> ) --> oOldXbpColumn
or
:setColumn( <nColPos>, <bDataLink>, ;
                      [<nWidth>], ;
                      [<cHeading|nHeadID>], ;
                      [<cFooting|nFootID>], ;
                      [<nType>] ) --> oOldXbpColumn
Parameters
<nColPos>
<nColPos> is a numeric value indicating the unique position in the browser's column array of the XbpColumn object to be replaced.
<...>
All other parameters are identical to the parameters of method :addColumn(). See there.
Return

:setColumn() returns a reference to the replaced XbpColumn object.

Description

:setColumn() replaces an XbpColumn object within an XbpBrowse object. The numeric value <nColPos> must be passed. It indicates the position of the column object to be replaced. The second parameter must be a configured XbpColumn object or a data code block. In the latter case the XbpBrowse object creates an XbpColumn object and replaces it with an existing one.

Except for the first parameter, the parameters of :setColumn() are identical to the ones of :addColumn() and are described there.

When :setColumn() is called the :destroy() method of the replaced XbpColumn object is executed.

Replacing a column in a browse implicitly defines the column's unique position in the browser's column array. This position is reflected in the :index member variable of a column, and is used as the identifier in methods like :delColumn().

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.