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.
- C#
- VB.NET
public class VisDropDownBase : SalComboBox
Public Class VisDropDownBase
Inherits 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
VisDropDownBase()
Initializes the drop-down host and designer components.
Properties
DropDownBorderStyle
BorderStyle: Gets or sets the drop-down host border.
DropDownControl
Control: Gets or sets the control hosted in the drop-down.
Assigning a different control updates the host immediately.
DropDownSize
Size: Gets or sets the configured drop-down size.
DroppedDown
Boolean: Gets or sets whether the hosted drop-down is visible.
Setting false hides the host and accepts the current drop-down selection.
Editable
Boolean: Gets or sets whether keyboard input can edit the combo-box text.
SelectedIndex
Int32: Provides the base compatibility selection property.
Always returns -1. Assignments are ignored; selection belongs to the custom popup.
Methods
Dispose(disposing)
Disposes the hosted drop-down control and host, then releases base resources.
| Parameter | Type | Description |
|---|---|---|
| disposing | Boolean | True to release managed resources as well as base resources; false for base cleanup only. |
OnHandleCreated(e)
Installs the native drop-down subclass outside design mode and raises the base event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The handle-creation event data. |
OnKeyDown(e)
Suppresses editing keys while allowing navigation and drop-down commands when Editable is false.
| Parameter | Type | Description |
|---|---|---|
| e | KeyEventArgs | The key data; Handled is set for suppressed keys. |
OnKeyPress(e)
Suppresses character editing when Editable is false.
| Parameter | Type | Description |
|---|---|---|
| e | KeyPressEventArgs | The key-press data; Handled is set for suppressed characters. |
Copy, Escape, and Return characters remain available. The base event is raised afterward.
ProcessCmdKey(msg, keyData)
Closes the drop-down on Escape and toggles it on F4 or Alt+Up/Down.
| Parameter | Type | Description |
|---|---|---|
| msg | Message | The keyboard message passed to the base handler when no drop-down command is consumed. |
| keyData | Keys | The key and modifier flags. |
Returns: Boolean. True when a drop-down command is handled; otherwise, the base command-processing result.
WndProc(m)
Processes combo-box command notifications and releases native subclasses when the handle is destroyed.
| Parameter | Type | Description |
|---|---|---|
| m | Message | The native message and its mutable result. |
Inherited By
| Name | Description |
|---|---|
| VisColorPaletteDropDown | Displays a color palette in a non-editable combo-box drop-down. |
| VisListViewDropDown | Hosts a Visual Toolchest list view in a combo-box drop-down. |
| VisOutlineComboBox | Displays an outline tree in a drop-down combo box. |
Implements
| Name | Description |
|---|---|
| ISalControl | |
| ISalEditControl | |
| ISalListControl | |
| ISalWindow |