VisDriveListBox
Namespace: PPJ.Runtime.Vis
Assembly: PPJ.Runtime.Vis.50 (5.0.0.0)
Displays logical drives in a list box.
- C#
- VB.NET
public class VisDriveListBox : VisListBoxBase
Public Class VisDriveListBox
Inherits VisListBoxBase
Example:
using (var list = new PPJ.Runtime.Vis.VisDriveListBox())
{
list.Populate();
}
Constructors
VisDriveListBox()
Initializes the drive list box and its default behavior.
Methods
FromHandle(handle)
Resolves this control type from a native window handle.
| Parameter | Type | Description |
|---|---|---|
| handle | SalWindowHandle | The native control handle. |
Returns: VisDriveListBox. The associated VisDriveListBox, or null when no managed control owns the handle.
A handle belonging to a different managed control type causes an InvalidCastException.
GetDrive(nIndex)
Extracts a drive path from an item caption.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The zero-based item index. |
Returns: SalString. The caption through its first directory separator, or the entire caption when no separator occurs.
GetDriveType(nIndex)
Reads the drive-type value associated with an item.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The zero-based item index. |
Returns: SalNumber. The stored Visual Toolchest drive-type code.
GetSelectedDrive()
Gets the drive path of the selected item.
Returns: SalString. The selected drive path, or an empty string if no item is selected.
Populate()
Replaces the items with logical drives and selects the current drive.
Returns: SalNumber. The number of items in the populated list.
Implements
| Name | Description |
|---|---|
| ISalControl | |
| ISalListControl | |
| ISalWindow |