VisDirListBox
Namespace: PPJ.Runtime.Vis
Assembly: PPJ.Web.Vis.50 (5.0.0.0)
Displays the current server directory, its ancestors, and its immediate subdirectories.
- C#
- VB.NET
public class VisDirListBox : VisListBoxBase
Public Class VisDirListBox
Inherits VisListBoxBase
Paths refer to the server filesystem. The control handles SAL creation messages to initialize its contents.
Example:
var list = new VisDirListBox();
list.Populate(System.IO.Path.GetTempPath());
Constructors
VisDirListBox()
Creates the control and registers its SAL message handlers. Disables sorting to preserve the directory hierarchy.
Methods
FromHandle(hWnd)
Resolves a SAL handle to an existing VisDirListBox.
| Parameter | Type | Description |
|---|---|---|
| hWnd | SalWindowHandle | The control handle to resolve. |
Returns: VisDirListBox. The associated control, or when no control is resolved.
Throws:
- InvalidCastException The handle identifies an incompatible control type.
GetSelectedDir()
Returns the directory stored by the control's creation and double-click handlers.
Returns: SalString. The value of sCurrentDir.
This is not necessarily the highlighted item. Calling Populate directly does not update the stored value.
OnLostFocus(e)
Clears the highlighted item before raising the inherited lost-focus event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
Populate(sDir)
Replaces the list with the specified directory's path and immediate subdirectories.
| Parameter | Type | Description |
|---|---|---|
| sDir | SalString | The server directory to display. |
Returns: SalBoolean. False if the directory does not exist; otherwise the item count converted to a Boolean.
The population helper traces enumeration exceptions. A nonzero count can represent partial contents after an enumeration error.
SetSelectedDir()
Repopulates the list for its highlighted directory.
Returns: SalString. The populated path, or Null if no item is selected or population fails.
Returns the chosen path without updating sCurrentDir; the double-click handler assigns that field.
Implements
| Name | Description |
|---|---|
| ISalControl | |
| ISalListControl | |
| ISalWindow |