Method XbpBrowse():getColumn() Foundation

Retrieves a reference to a column (XbpColumn object ) in an XbpBrowse object.

Syntax
:getColumn( <nColPos> [,<lCreatePosition>]  ) --> oXbpColumn
Parameters
<nColPos>
<nColPos> is a numeric value which indicates which XbpColumn object reference is required. The meaning of this value depends on the <lCreatePosition> parameter. By default, <nColPos> is assumed to be the unique position of the desired column in the browser's column array. This position is defined at the time the column is added to the browse.
<lCreatePosition>
<lCreatePosition> specifies whether the column position is specified as the unique position in the browser's column array, or if it is given as the column's current on-screen position. The <lCreatePosition> parameter defaults to .T. (TRUE), meaning that the unique position is assumed when no value is passed in this parameter. If the value .F. (FALSE) is passed, <nColPos> is assumed to contain the column's display position.
Return

:getColumn() returns a reference to the XbpColumn object held in position <nColPos>. The object reference can be used to make changes to the column at runtime.

Description

When the numeric value <nColPos> is passed to the method :getColumn(), the XbpBrowse object returns a reference to the corresponding column object. Using the reference, changes to the column can be made that also update the column definition stored with the XbpBrowse. However, such changes are not immediately realized. Only when the XbpBrowse is notified explicitly through a :configure() or :refreshAll() will the changes to the column become visible.

By default, :getColumn() examines columns in the order they were added to the browse, and expects a matching column position to be specified in the <nColPos> parameter. This so-called creation order may be different from the order the columns are displayed in. This is because column ordering may be changed at runtime, for example using the :setLeftFrozen() method, or when columns are hidden with :hide(). To get a column given its on-screen position, set the <lCreatePosition> to .F. (FALSE).

A column's unique position in the browser's column array is reflected in the column's :index member variable. The on-screen position is stored in the member :displayIndex.

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.