Skip to main content
Version: 2025

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.

public class VisDirListBox : 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​

Instance member VisDirListBox()​

Creates the control and registers its SAL message handlers. Disables sorting to preserve the directory hierarchy.

Methods​

Static member FromHandle(hWnd)​

Resolves a SAL handle to an existing VisDirListBox.

ParameterTypeDescription
hWndSalWindowHandleThe control handle to resolve.

Returns: VisDirListBox. The associated control, or when no control is resolved.

Throws:

Instance member 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.

Protected member OnLostFocus(e)​

Clears the highlighted item before raising the inherited lost-focus event.

ParameterTypeDescription
eEventArgsThe event data.

Instance member Populate(sDir)​

Replaces the list with the specified directory's path and immediate subdirectories.

ParameterTypeDescription
sDirSalStringThe 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.

Instance member 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​

NameDescription
ISalControl
ISalListControl
ISalWindow