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
Returns a SftDirectoryColumn object for a given contents value.
Get
VB.NET | refColumnObj = object.get_Column(ByVal ColumnContents As SftDirectoryContentsConstants) As SftDirectoryColumn |
VB | Set refColumnObj = object.Column(ByVal ColumnContents As SftDirectoryContentsConstants) As SftDirectoryColumn |
C#.NET | SftDirectoryColumn refColumnObj = object.get_Column(SftDirectoryContentsConstants ColumnContents); |
VC++ | ISftDirectoryColumn* refColumnObj = object->Column[enum SftDirectoryContentsConstants ColumnContents]; ISftDirectoryColumn* refColumnObj = object->GetColumn(enum SftDirectoryContentsConstants ColumnContents); |
C | HRESULT object->get_Column(enum SftDirectoryContentsConstants ColumnContents, ISftDirectoryColumn** refColumnObj); |
object
ColumnContents
Defines the column contents for which a SftDirectoryColumn object should be returned.
ColumnContents | Value | Description |
---|---|---|
contentsSftDirectoryName | 0 | Name - Simple folder name. |
contentsSftDirectorySize | 1 | Size - The file size, if available. |
contentsSftDirectoryType | 2 | Type - The type of the folder as defined by the Windows Shell, if available. |
contentsSftDirectoryDateMod | 3 | Date Modified - The date the folder was last modified, if available. |
contentsSftDirectoryDateCre | 4 | Date Created - The date the folder was last modified, if available. |
contentsSftDirectoryDateAcc | 5 | Date Accessed - The date the folder was last accessed, if available. |
contentsSftDirectoryAttributes | 6 | Attributes - The attributes of the folder: 'A' - Folders ready to be archived, 'H' - hidden, 'C' - compressed, 'E' - encrypted folders. |
contentsSftDirectoryUser1 | 51 | User defined 1 - User-defined contents are added while the control's contents are added using the UserContents event. If user-defined contents are added, the AutoInitialLoad property may need to be set to False. |
contentsSftDirectoryUser2 | 52 | User defined 2. |
contentsSftDirectoryUser3 | 53 | User defined 3. |
contentsSftDirectoryUser4 | 54 | User defined 4. |
contentsSftDirectoryUser5 | 55 | User defined 5. |
contentsSftDirectoryUser6 | 56 | User defined 6. |
contentsSftDirectoryUser7 | 57 | User defined 7. |
contentsSftDirectoryUser8 | 58 | User defined 8. |
contentsSftDirectoryUser9 | 59 | User defined 9. |
refColumnObj
Returns a SftDirectoryColumn object for a given contents value.
The Column property returns a SftDirectoryColumn object for a given contents value.
Columns are managed by their contents value ColumnContents, rather than by their position. The column object SftDirectoryColumn is returned for the column containing the desired contents. If two columns have the same contents, the first column is returned. It is not possible to return the second column with identical contents.
The ColumnEntry property can be used to retrieve SftDirectoryColumn objects using the zero-based column number.
The AutoInitialLoad property may need to be set to False so the control does not load its contents immediately. This may be necessary if user-defined contents are added in certain columns. The UserContents event may not occur when the control is initially created, due to certain environment restrictions. For example, in Visual Basic, the UserContents event is not generated until the Form_Load event has occurred. The control however is created before the Form_Load event occurs, preventing the UserContents events from being handled by the application. This in effect prevents any user-defined contents from being added to the control. The solution is to set AutoInitialLoad to False and use the control's Reload method in the Form_Load event. Setting AutoInitialLoad to False isn't absolutely necessary, but it may save processing time as the control contents are only loaded once, in response to the Reload method.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' Displays all physical drives ' To avoid duplicate loading, use AutoInitialLoad = False in ' property page AxSftDirectory1.ControlStyle = SftDirectoryStyleConstants.styleSftDirectoryComboBoxDetailList AxSftDirectory1.TopMostFolderSpecial = SftDirectorySpecialFolderConstants.specialSftDirectoryMyComputer AxSftDirectory1.Headers.Style = SftDirectoryHeadersStyleConstants.headersSftDirectoryButton AxSftDirectory1.get_Column(SftDirectoryContentsConstants.contentsSftDirectoryName).HeaderText = "Drives" End Sub Private Sub AxSftDirectory1_Filtering(ByVal sender As Object, ByVal e As AxSftDirectoryLib30._ISftDirectoryEvents_FilteringEvent) Handles AxSftDirectory1.Filtering ' This filters out folders such as "Shared Documents", "Control Panel", which ' are part of "My Computer" If e.folder.Type >= SftDirectoryFolderTypeConstants.typeSftDirectory_Computer_Drive35 And _ e.folder.Type <= SftDirectoryFolderTypeConstants.typeSftDirectory_Computer_Other Then ' OK, add this to the control contents
Private Sub Form_Load() ' Displays all physical drives ' To avoid duplicate loading, use AutoInitialLoad = False in ' property page SftDirectory1.ControlStyle = styleSftDirectoryComboBoxDetailList SftDirectory1.TopMostFolderSpecial = specialSftDirectoryMyComputer SftDirectory1.Headers.Style = headersSftDirectoryButton SftDirectory1.Column(contentsSftDirectoryName).HeaderText = "Drives" End Sub Private Sub SftDirectory1_Filtering(Folder As SftDirectoryLib30.ISftDirectoryFolder, RemoveFolder As Boolean) ' This filters out folders such as "Shared Documents", "Control Panel", which ' are part of "My Computer" If Folder.Type >= typeSftDirectory_Computer_Drive35 And Folder.Type <= typeSftDirectory_Computer_Other Then ' OK, add this to the control contents Else
private void Form1_Load(object sender, System.EventArgs e) { // Displays all physical drives // To avoid duplicate loading, use AutoInitialLoad = False in // property page axSftDirectory1.ControlStyle = SftDirectoryStyleConstants.styleSftDirectoryComboBoxDetailList; axSftDirectory1.TopMostFolderSpecial = SftDirectorySpecialFolderConstants.specialSftDirectoryMyComputer; axSftDirectory1.Headers.Style = SftDirectoryHeadersStyleConstants.headersSftDirectoryButton; axSftDirectory1.get_Column(SftDirectoryContentsConstants.contentsSftDirectoryName).HeaderText = "Drives"; } private void axSftDirectory1_Filtering(object sender, AxSftDirectoryLib30._ISftDirectoryEvents_FilteringEvent e) { // This filters out folders such as "Shared Documents", "Control Panel", which // are part of "My Computer" if (e.folder.Type >= SftDirectoryFolderTypeConstants.typeSftDirectory_Computer_Drive35 &&
m_vDir1 = m_Dir1.GetControlUnknown(); // Displays all physical drives // To avoid duplicate loading, use AutoInitialLoad = False in // property page m_vDir1->ControlStyle = styleSftDirectoryComboBoxDetailList; m_vDir1->TopMostFolderSpecial = specialSftDirectoryMyComputer; m_vDir1->Headers->Style = headersSftDirectoryButton; m_vDir1->Column[contentsSftDirectoryName]->HeaderText = "Drives"; return TRUE; } void CFilteringDlg::OnFilteringSftDirectory1(LPDISPATCH FAR* Folder, BOOL FAR* RemoveFolder) { ISftDirectoryFolderPtr pFolder(*Folder);
See Also SftDirectory Object | Object Hierarchy