Hide

SftBox/OCX 5.0 - Combo Box Control

Display
Print

Display Vs. Real Columns

When allowing column reordering, the user may see columns in an order other than the order in which an application sees the columns. An application always uses "real" columns. A column which was originally added as column 0 will always remain column 0 for the application, even if the column order has been changed and the column is no longer the first column displayed. This simplifies the application's programming logic as it can assume that the column position never changes. SftBox/OCX translates the real column number into the actual column number. The actual column number is referred to as the "display column" number.

The display column number is identical to the order in which the columns are displayed.

Translating Real Column to Display Column

An application can retrieve a "real" column's "display" column number by inspecting the column information returned by Column.DisplayPosition. In this example, the real column number of the third column is translated to the display column number:

Dim DispCol As Integer, RealCol As Integer
RealCol = 2
DispCol = SftBox1.Column(RealCol).DisplayPosition

Translating Display Column to Real Column

If an application needs to translate a display column number to a real column number, the column information returned by Column.RealPosition can be used:

In this example, the display column number of the second displayed column is translated to the real column number.

Dim RealCol As Integer, DispCol As Integer
DispCol = 1
RealCol = SftBox1.Column(DispCol).RealPosition

Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.