SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
When allowing column drag & drop to reorder columns, 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 in API calls. A column which was originally added as column 0 will always remain column 0 for API calls made by 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. SftTree/DLL 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.
An application can retrieve a "real" column's "display" column number by inspecting the column information returned by GetDisplayColumn or GetColumns. In this example, the real column number of the third column is translated to the display column number:
C
displayPosition = SftTree_GetDisplayColumn(2);
or
LPSFTTREE_COLUMN_EX lpCol; int nCols, displayPosition; nCols = SftTree_GetColumnsEx(hwndTree, &lpCol);/* Get column attributes */ displayPosition = lpCol[2].dispPos; /* Extract the display position */
C++
displayPosition = m_Tree.GetDisplayColumn(2);
or
LPSFTTREE_COLUMN_EX lpCol; int nCols, displayPosition; nCols = m_Tree.GetColumns(&lpCol); /* Get all column attributes */ displayPosition = lpCol[2].dispPos; /* Extract the display position */
If an application needs to translate a display column number to a real column number, the column information returned by GetRealColumn or GetColumns can be used:
In this example, the display column number of the second displayed column is translated to the real column number. Please note that even though GetColumns returns an array of SFTTREE_COLUMN_EX structures in real column order, the realPos member can be retrieved only by using a display column number as an array index.
C
realPosition = SftTree_GetRealColumn(1);
or
LPSFTTREE_COLUMN_EX lpCol; int nCols, realPosition; nCols = SftTree_GetColumnsEx(hwndTree, &lpCol);/* Get column attributes */ realPosition = lpCol[1].realPos; /* Extract the real position */
C++
realPosition = m_Tree.GetRealColumn(1);
or
LPSFTTREE_COLUMN_EX lpCol; int nCols, realPosition; nCols = m_Tree.GetColumns(&lpCol); /* Get all column attributes */ realPosition = lpCol[1].realPos; /* Extract the real position */