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
Defines whether the file/folder is selected.
Get
VB.NET | Boolean = object.Selected As Boolean |
VB | Boolean = object.Selected As Boolean |
C#.NET | bool Boolean = object.Selected; |
VC++ | VARIANT_BOOL Boolean = object->Selected; VARIANT_BOOL Boolean = object->GetSelected(); |
C | HRESULT object->get_Selected(VARIANT_BOOL* Boolean); |
Put
VB.NET | object.Selected = Boolean As Boolean |
VB | object.Selected = Boolean As Boolean |
C#.NET | bool object.Selected = Boolean; |
VC++ | VARIANT_BOOL object->Selected = Boolean; void object->PutSelected(VARIANT_BOOL Boolean); |
C | HRESULT object->put_Selected(VARIANT_BOOL Boolean); |
object
A SftDirectoryFolder object.
Boolean
Defines whether the file/folder is selected.
Boolean | Description |
---|---|
True | The folder is selected. |
False | The folder is not selected. |
The Selected property defines whether the file/folder is selected.
If only single selection is supported by the current control style (see ControlStyle property), selecting a file/folder using the Selected property will automatically deselect all other files/folders, otherwise selections made using the Selected property are cumulative.
The SelectionCount property contains the number of currently selected files/folders. The selected files/folders can be retrieved using the Selection property.
The MultiSelect property defines whether only one or multiple files/folders can be selected at a time. Combo box style controls (see ControlStyle property) support single selection only.
All selections can be cleared using the ClearSelection property.
The Folder.MakeVisible method can be used to make the file/folder visible using vertical scrolling if needed.
AxSftDirectory1.MultiSelect = SftDirectoryMultiSelectConstants.selectSftDirectorySingle ' SftDirectory2 allows multiple selection AxSftDirectory2.MultiSelect = SftDirectoryMultiSelectConstants.selectSftDirectoryMultiple End Sub ' This is a button event handler Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ' Select one file/folder (in a single selection control) AxSftDirectory1.get_FolderList(1).Selected = True ' Select a few files/folders (in a multiple selection control) AxSftDirectory2.get_FolderList(1).Selected = True AxSftDirectory2.get_FolderList(3).Selected = True AxSftDirectory2.get_FolderList(5).Selected = True End Sub ' This is another button event handler
SftDirectory1.MultiSelect = selectSftDirectorySingle ' SftDirectory2 allows multiple selection SftDirectory2.MultiSelect = selectSftDirectoryMultiple End Sub ' This is a button event handler Private Sub Command1_Click() ' Select one file/folder (in a single selection control) SftDirectory1.FolderList(1).Selected = True ' Select a few files/folders (in a multiple selection control) SftDirectory2.FolderList(1).Selected = True SftDirectory2.FolderList(3).Selected = True SftDirectory2.FolderList(5).Selected = True End Sub ' This is another button event handler
// SftDirectory2 allows multiple selection axSftDirectory2.MultiSelect = SftDirectoryMultiSelectConstants.selectSftDirectoryMultiple; } // This is a button event handler private void button1_Click(object sender, System.EventArgs e) { // Select one file/folder (in a single selection control) axSftDirectory1.get_FolderList(1).Selected = true; // Select a few files/folders (in a multiple selection control) axSftDirectory2.get_FolderList(1).Selected = true; axSftDirectory2.get_FolderList(3).Selected = true; axSftDirectory2.get_FolderList(5).Selected = true; } // This is another button event handler
return TRUE; } // This is a button event handler void CSelectionsDlg::OnButton1() { // Select one file/folder (in a single selection control) m_vDir1->FolderList[1]->Selected = VARIANT_TRUE; // Select a few files/folders (in a multiple selection control) m_vDir2->FolderList[1]->Selected = VARIANT_TRUE; m_vDir2->FolderList[3]->Selected = VARIANT_TRUE; m_vDir2->FolderList[5]->Selected = VARIANT_TRUE; } // This is another button event handler void CSelectionsDlg::OnButton2()
See Also SftDirectoryFolder Object | Object Hierarchy