Skip to main content

VisDropDownBase

Namespace: PPJ.Runtime.Vis

Assembly: PPJ.Runtime.Vis.50 (5.0.0.0)

Provides a combo box that hosts an arbitrary control in its drop-down window.

public class VisDropDownBase : SalComboBox

Derived controls assign DropDownControl and configure its size and border.

Example:

void Configure(PPJ.Runtime.Vis.VisDropDownBase combo)
{
combo.Editable = false;
combo.DropDownSize = new System.Drawing.Size(240, 180);
}

Constructors

Instance member VisDropDownBase()

Initializes the drop-down host and designer components.

Properties

BorderStyle: Gets or sets the drop-down host border.

Control: Gets or sets the control hosted in the drop-down.

Assigning a different control updates the host immediately.

Size: Gets or sets the configured drop-down size.

Instance member DroppedDown

Boolean: Gets or sets whether the hosted drop-down is visible.

Setting false hides the host and accepts the current drop-down selection.

Instance member Editable

Boolean: Gets or sets whether keyboard input can edit the combo-box text.

Instance member SelectedIndex

Int32: Provides the base compatibility selection property.

Always returns -1. Assignments are ignored; selection belongs to the custom popup.

Methods

Protected member Dispose(disposing)

Disposes the hosted drop-down control and host, then releases base resources.

ParameterTypeDescription
disposingBooleanTrue to release managed resources as well as base resources; false for base cleanup only.

Protected member OnHandleCreated(e)

Installs the native drop-down subclass outside design mode and raises the base event.

ParameterTypeDescription
eEventArgsThe handle-creation event data.

Protected member OnKeyDown(e)

Suppresses editing keys while allowing navigation and drop-down commands when Editable is false.

ParameterTypeDescription
eKeyEventArgsThe key data; Handled is set for suppressed keys.

Protected member OnKeyPress(e)

Suppresses character editing when Editable is false.

ParameterTypeDescription
eKeyPressEventArgsThe key-press data; Handled is set for suppressed characters.

Copy, Escape, and Return characters remain available. The base event is raised afterward.

Protected member ProcessCmdKey(msg, keyData)

Closes the drop-down on Escape and toggles it on F4 or Alt+Up/Down.

ParameterTypeDescription
msg by referenceMessageThe keyboard message passed to the base handler when no drop-down command is consumed.
keyDataKeysThe key and modifier flags.

Returns: Boolean. True when a drop-down command is handled; otherwise, the base command-processing result.

Protected member WndProc(m)

Processes combo-box command notifications and releases native subclasses when the handle is destroyed.

ParameterTypeDescription
m by referenceMessageThe native message and its mutable result.

Inherited By

NameDescription
VisColorPaletteDropDownDisplays a color palette in a non-editable combo-box drop-down.
VisListViewDropDownHosts a Visual Toolchest list view in a combo-box drop-down.
VisOutlineComboBoxDisplays an outline tree in a drop-down combo box.

Implements

NameDescription
ISalControl
ISalEditControl
ISalListControl
ISalWindow