VisOutlineListBox
Namespace: PPJ.Runtime.Vis
Assembly: PPJ.Runtime.Vis.50 (5.0.0.0)
Displays a Visual Toolchest outline with SAL messages, item data, and optional multiple selection.
- C#
- VB.NET
public class VisOutlineListBox : TreeView, ISalWindow, ISalControl, ISalListControl
Public Class VisOutlineListBox
Inherits TreeView
Implements ISalWindow, ISalControl, ISalListControl
Example:
using (var outline = new PPJ.Runtime.Vis.VisOutlineListBox())
{
outline.HorizontalScrollbar = true;
}
Constructors
VisOutlineListBox()
Initializes the SAL window adapter, outline item extension, and tree display defaults.
Properties
AllowDrag
Boolean: Gets or sets whether automatic dragging is enabled. (Default: True)
CreateParams
CreateParams: Gets native creation parameters for the outline tree.
hFont
Reads or updates the value held by this control's list extension.
hItem
Reads or updates the value held by this control's list extension.
HorizontalScrollbar
Boolean: Gets or sets whether the outline can display a horizontal scrollbar. (Default: True)
hPicNormal
Reads or updates the value held by this control's list extension.
hPicSelect
Reads or updates the value held by this control's list extension.
ImageSize
Size: Gets or sets the default node image size. (Default: "16, 16")
An existing image list is updated immediately.
Label
Control: Gets or sets the label associated with this control through the SAL window implementation.
NamedProperties
SalNamedProperties: Gets the SAL named-property collection associated with this control.
nColor
Reads or updates the value held by this control's list extension.
nIndex
Reads or updates the value held by this control's list extension.
nItemFlags
Reads or updates the value held by this control's list extension.
nLevel
Reads or updates the value held by this control's list extension.
nStyle
Reads or updates the value held by this control's list extension.
nValue
Reads or updates the value held by this control's list extension.
SelectedNodes
TreeNode[]: Gets a snapshot of the selected nodes.
SelectionMode
SelectionMode: Gets or sets the outline selection mode. (Default: One)
Changing an existing multiple-selection mode clears the selected nodes.
sText
Reads or updates the value held by this control's list extension.
UseStateImageList
Boolean: Gets or sets whether custom drawing uses the state image list.
Setting this property invalidates the control.
Methods
AddColor(text, color)
| Parameter | Type | Description |
|---|---|---|
| text | SalString | |
| color | SalNumber |
Returns: SalNumber.
AddColorValue(text, color, value)
| Parameter | Type | Description |
|---|---|---|
| text | SalString | |
| color | SalNumber | |
| value | SalNumber |
Returns: SalNumber.
AddFont(text, hFont)
| Parameter | Type | Description |
|---|---|---|
| text | SalString | |
| hFont | SalNumber |
Returns: SalNumber.
AddFontValue(text, hFont, value)
| Parameter | Type | Description |
|---|---|---|
| text | SalString | |
| hFont | SalNumber | |
| value | SalNumber |
Returns: SalNumber.
AddListItem(sName)
| Parameter | Type | Description |
|---|---|---|
| sName | SalString |
Returns: SalNumber.
Applies the referenced SAL operation to this control.
AddPicture(text, picNormal, picSelect)
| Parameter | Type | Description |
|---|---|---|
| text | SalString | |
| picNormal | SalNumber | |
| picSelect | SalNumber |
Returns: SalNumber.
AddPictureValue(text, picNormal, picSelect, value)
| Parameter | Type | Description |
|---|---|---|
| text | SalString | |
| picNormal | SalNumber | |
| picSelect | SalNumber | |
| value | SalNumber |
Returns: SalNumber.
BringWindowToTop()
Brings this control to the front, or activates it when it is a top-level or MDI form.
Returns: SalBoolean. True if the translated control exists; otherwise, false.
CenterWindow()
Centers this window within its parent or, for a top-level form, its owner or screen working area.
Returns: SalBoolean. True when the translated control exists; otherwise, false.
A top-level form is constrained to the selected screen working area. A control without a parent is unchanged unless it is a top-level form.
Clear()
Clears the value or selection appropriate to this control type.
Returns: SalBoolean. False for an unavailable control or a form; otherwise, true.
Editable controls and labels have their text cleared; check boxes are unchecked; list selections are cleared. A date/time picker is set to the current date and time. Unrecognized control types are unchanged.
ClearCursor(nType)
Restores the default cursor for a role, using the I-beam for TextBox subclasses.
| Parameter | Type | Description |
|---|---|---|
| nType | SalNumber | The cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop. |
Returns: SalBoolean. True if the cursor is assigned to a supported role; otherwise, false.
ClearList()
Removes all items from the list.
Returns: SalBoolean. True when the target supports lists; otherwise, false.
Collapse(index)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber |
Returns: SalBoolean.
DeleteChild(index)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber |
Returns: SalNumber.
DeleteDescendents(index)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber |
Returns: SalNumber.
DeleteListItem(nIndex)
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber |
Returns: SalNumber.
Applies the referenced SAL operation to this control.
Demote(index, picNormal, picSelect)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber | |
| picNormal | SalNumber | |
| picSelect | SalNumber |
Returns: SalBoolean.
DestroyWindow()
Closes this window when it is a form, or disposes the control.
Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
A true result reports that the close or disposal request was made; a form can apply its own closing behavior.
DisableItem(index, color)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber | |
| color | SalNumber |
Returns: SalNumber.
DisableWindow()
Disables input to this control, or clears editability for a table column.
Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
DisableWindowAndLabel()
Disables input to this control and disables its associated label.
Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
DoDragDrop(sourceIndex, target, targetIndex, dropMode)
Moves an outline node into another outline tree.
| Parameter | Type | Description |
|---|---|---|
| sourceIndex | SalNumber | The source item index. |
| target | SalWindowHandle | The destination VisOutlineListBox. |
| targetIndex | SalNumber | The destination item index. |
| dropMode | SalNumber | DROP_Child to append under the target, or DROP_Sibling to insert after it. |
Returns: SalBoolean. True if the node moves; false for invalid nodes, unsupported targets/modes, or a move onto itself or a descendant.
EnableItem(index, color)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber | |
| color | SalNumber |
Returns: SalNumber.
EnableWindow()
Enables input to this control, or enables editing for a table column.
Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
For text-box controls, this operation also clears the read-only setting.
Native disabled styles are also cleared. When needed, tab navigation is restored except for unchecked radio buttons.
EnableWindowAndLabel()
Enables input to this control and enables its associated label.
Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
EnumChildren(hItem, hItems)
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | |
| hItems | SalArray<SalNumber> |
Returns: SalNumber.
EnumDescendents(hItemParent, hItems)
| Parameter | Type | Description |
|---|---|---|
| hItemParent | SalNumber | |
| hItems | SalArray<SalNumber> |
Returns: SalNumber.
Expand(index)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber |
Returns: SalNumber.
ExpandDescendents(index)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber |
Returns: SalBoolean.
FindChild(windowName)
Searches this window for a child control by name.
| Parameter | Type | Description |
|---|---|---|
| windowName | SalString | The child control name to locate. |
Returns: SalWindowHandle. The matching child handle, or a null SAL handle if no child is found.
FindItemValue(hItem, value)
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | |
| value | SalNumber |
Returns: SalNumber.
FormUnitsToPixels(formUnits, vertical)
Converts a length in form units to pixels using this control's form metrics.
| Parameter | Type | Description |
|---|---|---|
| formUnits | SalNumber | The length in form units. |
| vertical | SalBoolean | True for a vertical measurement; false for a horizontal measurement. |
Returns: SalNumber. The converted pixel length.
FreeChild(hItemChild)
| Parameter | Type | Description |
|---|---|---|
| hItemChild | SalNumber |
Returns: SalBoolean.
FreeDescendents(hItemParent)
| Parameter | Type | Description |
|---|---|---|
| hItemParent | SalNumber |
Returns: SalBoolean.
FromHandle(handle)
Resolves the managed outline control associated with a native window handle.
| Parameter | Type | Description |
|---|---|---|
| handle | SalWindowHandle | The native control handle. |
Returns: VisOutlineListBox. The corresponding VisOutlineListBox, or null when no managed control owns the handle.
A handle owned by another control type causes an InvalidCastException.
GetChildNodeCount(hItem, directChildrenOnly)
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | |
| directChildrenOnly | SalBoolean |
Returns: SalNumber.
GetClassName()
Gets the translated application class name associated with this control.
Returns: SalString. The class name, an empty string for a runtime-defined class, or a null SAL string for an unresolved or native control.
Forms use their base type; nested table-window types are walked upward to a non-nested type.
GetColor(index)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber |
Returns: SalNumber.
GetControlType()
Gets the SAL window type of this control.
Returns: SalNumber. The SAL Sys.TYPE_* code for the translated control.
GetDataType()
Gets the SAL data type represented by this control.
Returns: SalNumber. The SAL data-type code, or zero if the translated control does not implement the SAL value contract.
GetFirstChild(typeMask)
Finds the first child matching a SAL window-type mask.
| Parameter | Type | Description |
|---|---|---|
| typeMask | SalNumber | The SAL window types to include; zero matches no controls. |
Returns: SalWindowHandle. The first matching child handle, or a null SAL handle when none matches.
Ordinary controls use tab order; table columns use their creation order, and MDI forms use their child-form collection.
GetFlags(index)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber |
Returns: SalNumber.
GetFont(index)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber |
Returns: SalNumber.
GetFont(name, size, enhancement)
Reads the control font's family, point size, and style flags.
| Parameter | Type | Description |
|---|---|---|
| name | SalString | Receives the font family name. |
| size | SalNumber | Receives the size in points. |
| enhancement | SalNumber | Receives the combined Sys.FONT_Enh* style flags. |
Returns: SalBoolean. True if a font was available; otherwise, false.
GetIndexFromPoint(xPos, yPos)
| Parameter | Type | Description |
|---|---|---|
| xPos | SalNumber | |
| yPos | SalNumber |
Returns: SalNumber.
GetItemColor(hItem)
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber |
Returns: SalNumber.
GetItemData(hItem, text, value, itemFlags)
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | |
| text | SalString | |
| value | SalNumber | |
| itemFlags | SalNumber |
Returns: SalBoolean.
GetItemFlags(hItem)
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber |
Returns: SalNumber.
GetItemFont(hItem)
Gets the native font handle for an outline item.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline item handle. |
Returns: SalNumber. The item font handle, or a newly allocated handle for the control font when the item has no font.
The fallback uses Font.ToHfont; release that native font handle when it is no longer needed.
GetItemHandle(index)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber |
Returns: SalNumber.
GetItemIndex(hItem)
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber |
Returns: SalNumber.
GetItemPicture(hItem, picNormal, picSelect)
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | |
| picNormal | SalNumber | |
| picSelect | SalNumber |
Returns: SalBoolean.
GetItemText(hItem)
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber |
Returns: SalString.
GetItemValue(hItem)
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber |
Returns: SalNumber.
GetLabel()
Gets the label associated with this control.
Returns: SalWindowHandle. The associated label handle, or a null SAL handle if no label can be found.
GetLabelText(sText, nMaxLength)
Copies the associated label text to a supplied variable.
| Parameter | Type | Description |
|---|---|---|
| sText | SalString | Receives the label text when it can be read. |
| nMaxLength | SalNumber | The maximum number of leading characters to copy. |
Returns: SalNumber. The number of characters copied, or zero if no label text is available.
GetLabelText(nMaxLength)
Gets this control's associated label text.
| Parameter | Type | Description |
|---|---|---|
| nMaxLength | SalNumber | The maximum number of leading characters to return. |
Returns: SalString. The label text limited to the requested length, or an empty string if no label exists.
GetLevel(hItem)
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber |
Returns: SalNumber.
GetListItemsCount()
Counts the entries in the list.
Returns: SalNumber. The item count, or Sys.LB_Err for an unsupported target.
GetListItemState(nIndex)
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber |
Returns: SalBoolean.
Applies the referenced SAL operation to this control.
GetListItemText(nIndex, sText)
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | |
| sText | SalString |
Returns: SalNumber.
Applies the referenced SAL operation to this control.
GetListItemText(nIndex)
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber |
Returns: SalString.
Applies the referenced SAL operation to this control.
GetListItemTextLength(nIndex)
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber |
Returns: SalNumber.
Applies the referenced SAL operation to this control.
GetListSelectedIndex()
Gets the selected tree node index.
Returns: SalNumber. The selected node index within its sibling collection, or the SAL adapter selection result when no node is selected.
GetListSelectedItems(nSelectedArray)
| Parameter | Type | Description |
|---|---|---|
| nSelectedArray | SalArray<SalNumber> |
Returns: SalBoolean.
Applies the referenced SAL operation to this control.
GetListSelectedItemsCount()
Counts selected entries in a multi-selection list.
Returns: SalNumber. The selected count, zero when selection is disabled, or -1 for single-selection mode.
GetLocation(x, y)
Reads this control's location in form units.
| Parameter | Type | Description |
|---|---|---|
| x | SalNumber | Receives the horizontal location. |
| y | SalNumber | Receives the vertical location. |
Returns: SalBoolean. Always true; an unresolved control produces zero coordinates.
GetName(text)
Copies this control's name to the supplied variable.
| Parameter | Type | Description |
|---|---|---|
| text | SalString | Receives the control name when the operation succeeds. |
Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
GetName()
Gets this control's name.
Returns: SalString. The control name, or an empty string if the control cannot be resolved.
GetNextChild(typeMask)
Finds the next sibling matching a SAL window-type mask.
| Parameter | Type | Description |
|---|---|---|
| typeMask | SalNumber | The SAL window types to include; zero matches no controls. |
Returns: SalWindowHandle. The next matching control handle, or a null SAL handle when none matches.
GetNextSibling(hItem)
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber |
Returns: SalNumber.
GetParent(hItem)
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber |
Returns: SalNumber.
GetParent()
Gets the SAL parent form, owner, or table container for this control.
Returns: SalWindowHandle. The parent window handle, or a null SAL handle if no parent can be resolved.
GetPicture(index, picNormal, picSelect)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber | |
| picNormal | SalNumber | |
| picSelect | SalNumber |
Returns: SalNumber.
GetPrevSibling(hItem)
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber |
Returns: SalNumber.
GetProperty(name, value)
Reads a SAL named property into a supplied variable.
| Parameter | Type | Description |
|---|---|---|
| name | SalString | The property name. |
| value | SalString | Receives the value only when the property is found. |
Returns: SalBoolean. True if a non-null property value was found; otherwise, false.
GetProperty(name)
Gets the value of a SAL named property.
| Parameter | Type | Description |
|---|---|---|
| name | SalString | The property name. |
Returns: SalString. The property value, or a SAL null string if the value is unavailable.
GetRoot()
Returns: SalNumber.
GetSize(width, height)
Reads this control's size in form units.
| Parameter | Type | Description |
|---|---|---|
| width | SalNumber | Receives the width. |
| height | SalNumber | Receives the height. |
Returns: SalBoolean. Always true; an unresolved control produces a zero size.
GetStyle()
Returns: SalNumber.
GetText(sText, nMaxLen)
Copies this control's displayed text or long-string value to a SAL string.
| Parameter | Type | Description |
|---|---|---|
| sText | SalString | Receives the retrieved text. |
| nMaxLen | SalNumber | The maximum character count for ordinary text; ignored for a Sys.DT_LongString value. |
Returns: SalNumber. The number of characters copied, or zero when no text is available.
GetText(nMaxLen)
Gets this control's displayed text or long-string value.
| Parameter | Type | Description |
|---|---|---|
| nMaxLen | SalNumber | The maximum character count for ordinary text; ignored for a Sys.DT_LongString value. |
Returns: SalString. The retrieved text, or an empty string if the control cannot be resolved.
GetTextRectangle(index, top, left, bottom, right)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber | |
| top | SalNumber | |
| left | SalNumber | |
| bottom | SalNumber | |
| right | SalNumber |
Returns: SalBoolean.
GetWindowColor(colorIndex)
Reads a window or cell color as a Win32 color value.
| Parameter | Type | Description |
|---|---|---|
| colorIndex | SalNumber | The Sys.COLOR_Index* color component to read. |
Returns: SalNumber. The color encoded as a Win32 color value, or zero if the control is unavailable.
Transparent colors are reported as Sys.COLOR_None. Table-column window colors use the system window colors; cell colors use the column settings.
GetWindowState()
Gets the visibility and form-state classification of this window.
Returns: SalNumber. A Sys.Window_* state code; visible non-form controls report Sys.Window_Normal.
HideWindow()
Hides this control or table column.
Returns: SalBoolean. The visibility state before the operation, or false if the control cannot be resolved.
HideWindowAndLabel()
Hides this control and its associated label.
Returns: SalBoolean. The control's visibility before the operation, or false if it cannot be resolved.
InsertColor(index, text, color)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber | |
| text | SalString | |
| color | SalNumber |
Returns: SalNumber.
InsertColorValue(index, text, color, value)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber | |
| text | SalString | |
| color | SalNumber | |
| value | SalNumber |
Returns: SalNumber.
InsertFont(index, text, hFont)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber | |
| text | SalString | |
| hFont | SalNumber |
Returns: SalNumber.
InsertFontValue(index, text, hFont, value)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber | |
| text | SalString | |
| hFont | SalNumber | |
| value | SalNumber |
Returns: SalNumber.
InsertListItem(nIndex, sAdd)
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | |
| sAdd | SalString |
Returns: SalNumber.
Applies the referenced SAL operation to this control.
InsertPicture(index, text, picNormal, picSelect)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber | |
| text | SalString | |
| picNormal | SalNumber | |
| picSelect | SalNumber |
Returns: SalNumber.
InsertPictureValue(index, text, picNormal, picSelect, value)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber | |
| text | SalString | |
| picNormal | SalNumber | |
| picSelect | SalNumber | |
| value | SalNumber |
Returns: SalNumber.
InvalidateWindow()
Invalidates this control and its child controls for repainting.
Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
IsDerivedFromClass(typeClass)
Tests this control's runtime type against an application base type.
| Parameter | Type | Description |
|---|---|---|
| typeClass | Type | The type to test, including the framework's emulated inheritance relationships. |
Returns: SalBoolean. True if the runtime type derives from the requested type; otherwise, false.
IsEnabled()
Determines whether this control accepts input.
Returns: SalBoolean. The enabled state, or the editable flag for a table column; false if the control cannot be resolved.
IsModified()
Reads this control's SAL modification flag.
Returns: SalBoolean. True if the control reports a modified value; otherwise, false.
IsVisible()
Determines whether this control is visible.
Returns: SalBoolean. The visible state, or the visibility flag for a table column; false if the control cannot be resolved.
KillTimer(idEvent)
Stops the native window timer with the specified identifier.
| Parameter | Type | Description |
|---|---|---|
| idEvent | SalNumber | The timer identifier to remove. |
Returns: SalBoolean. The native timer-removal result, or false if the control cannot be resolved.
LoadChild(hItemParent, picNormal, picSelect, text, value, itemFlags)
| Parameter | Type | Description |
|---|---|---|
| hItemParent | SalNumber | |
| picNormal | SalNumber | |
| picSelect | SalNumber | |
| text | SalString | |
| value | SalNumber | |
| itemFlags | SalNumber |
Returns: SalNumber.
LoadChildren(hItemParent, picNormal, picSelect, text, values, itemFlags)
| Parameter | Type | Description |
|---|---|---|
| hItemParent | SalNumber | |
| picNormal | SalNumber | |
| picSelect | SalNumber | |
| text | SalArray<SalString> | |
| values | SalArray<SalNumber> | |
| itemFlags | SalArray<SalNumber> |
Returns: SalNumber.
LoadChildren(hItemParent, picNormal, picSelect, text, values, itemFlags)
| Parameter | Type | Description |
|---|---|---|
| hItemParent | SalNumber | |
| picNormal | SalArray<SalNumber> | |
| picSelect | SalArray<SalNumber> | |
| text | SalArray<SalString> | |
| values | SalArray<SalNumber> | |
| itemFlags | SalArray<SalNumber> |
Returns: SalNumber.
LoadOutline(blob)
| Parameter | Type | Description |
|---|---|---|
| blob | SalString |
Returns: SalNumber.
LoadOutlineFile(fileName, picParentNormal, picParentSelect, picChildNormal, picChildSelect)
| Parameter | Type | Description |
|---|---|---|
| fileName | SalString | |
| picParentNormal | SalNumber | |
| picParentSelect | SalNumber | |
| picChildNormal | SalNumber | |
| picChildSelect | SalNumber |
Returns: SalNumber.
LoadSibling(hItemBefore, picNormal, picSelect, text, value, itemFlags)
| Parameter | Type | Description |
|---|---|---|
| hItemBefore | SalNumber | |
| picNormal | SalNumber | |
| picSelect | SalNumber | |
| text | SalString | |
| value | SalNumber | |
| itemFlags | SalNumber |
Returns: SalNumber.
MoveDown(index)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber |
Returns: SalBoolean.
MoveUp(index)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber |
Returns: SalBoolean.
MoveWindow(nXOffset, nYOffset)
Moves this control by an offset expressed in form units.
| Parameter | Type | Description |
|---|---|---|
| nXOffset | SalNumber | The horizontal offset to add to the current position. |
| nYOffset | SalNumber | The vertical offset to add to the current position. |
Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
OnAfterSelect(e)
Marks the outline modified, sends SAM_Click for keyboard selection, and restores a saved multiple selection.
| Parameter | Type | Description |
|---|---|---|
| e | TreeViewEventArgs | The event data. |
OnBeforeSelect(e)
Prevents disabled item selection and saves the current multiple selection before the base event.
| Parameter | Type | Description |
|---|---|---|
| e | TreeViewCancelEventArgs | The event data. |
OnDragDrop(e)
Raises the base drop event and clears the drop highlight.
| Parameter | Type | Description |
|---|---|---|
| e | DragEventArgs | The event data. |
OnDragLeave(e)
Raises the base drag-leave event and clears the drop highlight.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnGotFocus(e)
Invalidates multiple-selection highlighting and raises the base focus event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnItemDrag(e)
Requests SAM_DragCanAutoStart for a left-button item drag and schedules dragging when the handler permits it.
| Parameter | Type | Description |
|---|---|---|
| e | ItemDragEventArgs | The event data. |
OnKeyDown(e)
Applies the configured multiple-selection keyboard behavior before raising the base event.
| Parameter | Type | Description |
|---|---|---|
| e | KeyEventArgs | The event data. |
OnKeyUp(e)
Posts VTM_Click and raises the base key-release event.
| Parameter | Type | Description |
|---|---|---|
| e | KeyEventArgs | The event data. |
OnLostFocus(e)
Invalidates multiple-selection highlighting and raises the base lost-focus event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnMouseUp(e)
Forwards mouse-release messages to SAL and posts VTM_Click for a left release over an item area.
| Parameter | Type | Description |
|---|---|---|
| e | MouseEventArgs | The event data. |
PixelsToFormUnits(nNumPixels, bVertical)
Converts a pixel length to form units using this control's form metrics.
| Parameter | Type | Description |
|---|---|---|
| nNumPixels | SalNumber | The pixel length to convert. |
| bVertical | SalBoolean | True for a vertical measurement; false for a horizontal measurement. |
Returns: SalNumber. The converted length in form units.
PopulateList(hSql, sSelect)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sSelect | SalString |
Returns: SalBoolean.
Applies the referenced SAL operation to this control.
PopulateList(hSql, sSelect, errorHandler)
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| sSelect | SalString | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
Applies the referenced SAL operation to this control.
PostMessage(msg, mywParam, mylParam)
Posts a native Windows message to this control for asynchronous processing.
| Parameter | Type | Description |
|---|---|---|
| msg | SalNumber | The Windows or SAL message code. |
| mywParam | SalNumber | The first message parameter. |
| mylParam | SalNumber | The second message parameter. |
Returns: SalBoolean. True if the native message was posted; false for an unavailable or disposed control, or if posting fails.
Promote(index, picNormal, picSelect)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber | |
| picNormal | SalNumber | |
| picSelect | SalNumber |
Returns: SalBoolean.
SaveOutline(blob)
| Parameter | Type | Description |
|---|---|---|
| blob | SalString |
Returns: SalNumber.
SendMessage(msg, mywParam, mylParam)
Sends a native Windows message to this control synchronously.
| Parameter | Type | Description |
|---|---|---|
| msg | SalNumber | The Windows or SAL message code. |
| mywParam | SalNumber | The first message parameter. |
| mylParam | SalNumber | The second message parameter. |
Returns: SalNumber. The native message result, or zero when the control is unavailable or disposed.
SendMessageToChildren(nMsg, nMywParam, nMylParam)
Dispatches a SAL message to this control's children.
| Parameter | Type | Description |
|---|---|---|
| nMsg | SalNumber | The SAL or application-defined message code. |
| nMywParam | SalNumber | The first message parameter. |
| nMylParam | SalNumber | The second message parameter. |
Returns: SalBoolean. The result of child-message dispatch; false if the parent is unavailable or disposed.
SetColor(index, color)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber | |
| color | SalNumber |
Returns: SalNumber.
SetContextMenu(menuName, flags)
Creates and assigns a context menu for this control.
| Parameter | Type | Description |
|---|---|---|
| menuName | SalString | The menu type name to resolve. |
| flags | SalNumber | Use Sys.CM_TableCell to assign the table's cell-editor menu; otherwise, assign the control's context menu. |
Returns: SalBoolean. True if a control and menu type resolve and the menu is created; otherwise, false.
When called during a SAL context-menu action, the created menu is also shown at the current mouse position.
SetContextMenu(menuType, flags)
Creates and assigns a context menu for this control.
| Parameter | Type | Description |
|---|---|---|
| menuType | Type | The menu type to instantiate. |
| flags | SalNumber | Use Sys.CM_TableCell to assign the table's cell-editor menu; otherwise, assign the control's context menu. |
Returns: SalBoolean. True if a control and menu type resolve and the menu is created; otherwise, false.
When called during a SAL context-menu action, the created menu is also shown at the current mouse position.
SetCursor(resource, type)
Loads a cursor resource and assigns it to the requested role.
| Parameter | Type | Description |
|---|---|---|
| resource | SalResourceCursor | The cursor resource to load. |
| type | SalNumber | The cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop. |
Returns: SalBoolean. True if the cursor is assigned to a supported role; otherwise, false.
SetCursor(resourceId, type)
Assigns a system cursor or a cursor identified by its native handle to the requested role.
| Parameter | Type | Description |
|---|---|---|
| resourceId | Int32 | A Sys.CURSOR_* identifier, or a native cursor handle represented as an integer. |
| type | SalNumber | The cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop. |
Returns: SalBoolean. True if the cursor is assigned to a supported role; otherwise, false.
SetCursor(blob, type)
Loads a cursor from binary data and assigns it to the requested role.
| Parameter | Type | Description |
|---|---|---|
| blob | SalString | The cursor file data stored in a SAL binary string. |
| type | SalNumber | The cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop. |
Returns: SalBoolean. True if loading and assignment succeed; otherwise, false.
SetCursorFile(file, type)
Loads a cursor file and assigns it to the requested role.
| Parameter | Type | Description |
|---|---|---|
| file | SalString | The cursor file path. |
| type | SalNumber | The cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop. |
Returns: SalBoolean. True if loading and assignment succeed; otherwise, false.
SetFlags(index, flags, state)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber | |
| flags | SalNumber | |
| state | SalBoolean |
Returns: SalBoolean.
SetFocus()
Moves keyboard focus to this control, deferring the change when SAL validation is in progress.
Returns: SalWindowHandle. The previously focused managed control as a SAL handle, or a null handle if the target is unavailable, a table column, an ActiveX host, disabled, or hidden.
SetFont(index, hFont)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber | |
| hFont | SalNumber |
Returns: SalNumber.
SetFont(name, size, enhancement)
Creates and assigns a font to this control.
| Parameter | Type | Description |
|---|---|---|
| name | SalString | The font family name. |
| size | SalNumber | The font size in points. |
| enhancement | SalNumber | The combined Sys.FONT_Enh* style flags. |
Returns: SalBoolean. True if the font was created and assigned; otherwise, false.
SetIndent(width)
| Parameter | Type | Description |
|---|---|---|
| width | SalNumber |
Returns: SalBoolean.
SetItemColor(hItem, color)
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | |
| color | SalNumber |
Returns: SalBoolean.
SetItemData(hItem, text, value, itemFlags)
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | |
| text | SalString | |
| value | SalNumber | |
| itemFlags | SalNumber |
Returns: SalNumber.
SetItemFlags(hItem, flags, state)
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | |
| flags | SalNumber | |
| state | SalBoolean |
Returns: SalBoolean.
SetItemFont(hItem, hFont)
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | |
| hFont | SalNumber |
Returns: SalBoolean.
SetItemPicture(hItem, picNormal, picSelect)
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | |
| picNormal | SalNumber | |
| picSelect | SalNumber |
Returns: SalBoolean.
SetItemText(hItem, text)
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | |
| text | SalString |
Returns: SalBoolean.
SetItemValue(hItem, value)
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | |
| value | SalNumber |
Returns: SalBoolean.
SetLabelText(sText)
Assigns the text of this control's associated label.
| Parameter | Type | Description |
|---|---|---|
| sText | SalString | The label text to display. |
Returns: SalBoolean. True if an associated label was found and updated; otherwise, false.
SetListRedraw(bRedraw)
Enables or suspends list redraw through the SAL adapter.
| Parameter | Type | Description |
|---|---|---|
| bRedraw | SalNumber | Nonzero to enable redraw; zero to suspend it. |
Returns: SalBoolean. The result returned by SalWindow.SetListRedraw.
SetListSelectedIndex(nIndex)
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber |
Returns: SalBoolean.
Applies the referenced SAL operation to this control.
SetListSelectedItems(nIndex, bSelect)
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | |
| bSelect | SalBoolean |
Returns: SalBoolean.
Applies the referenced SAL operation to this control.
SetListSelectedText(nIndexStart, sText)
| Parameter | Type | Description |
|---|---|---|
| nIndexStart | SalNumber | |
| sText | SalString |
Returns: SalNumber.
Applies the referenced SAL operation to this control.
SetLocation(x, y)
Sets this control's location in form units.
| Parameter | Type | Description |
|---|---|---|
| x | SalNumber | The new horizontal coordinate. |
| y | SalNumber | The new vertical coordinate. |
Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
For forms, this also selects manual startup positioning.
SetModified(bSet)
Sets this control's SAL modification flag.
| Parameter | Type | Description |
|---|---|---|
| bSet | SalBoolean | True to mark the value modified; false to clear the flag. |
Returns: SalBoolean. True if the translated control supports SAL values; otherwise, false.
For editable SAL controls, this also clears the validation flag.
SetOutlineRedraw(state)
| Parameter | Type | Description |
|---|---|---|
| state | SalBoolean |
Returns: SalBoolean.
SetPicture(index, picNormal, picSelect)
| Parameter | Type | Description |
|---|---|---|
| index | SalNumber | |
| picNormal | SalNumber | |
| picSelect | SalNumber |
Returns: SalNumber.
SetProperty(name, value, length)
Assigns a SAL named property after limiting the value's length.
| Parameter | Type | Description |
|---|---|---|
| name | SalString | The property name. |
| value | SalString | The value to assign. |
| length | SalNumber | The number of leading characters to retain. |
Returns: SalBoolean. True if the translated control implements the SAL window contract; otherwise, false.
SetSelected(node, selected)
Changes a node selection flag through the native tree control.
| Parameter | Type | Description |
|---|---|---|
| node | TreeNode | The node to update. Null is ignored. |
| selected | Boolean | True to select the node; false to clear its selection. |
SetSize(width, height)
Sets this control's dimensions in form units.
| Parameter | Type | Description |
|---|---|---|
| width | SalNumber | The new width. |
| height | SalNumber | The new height. |
Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
SetStyle(style)
| Parameter | Type | Description |
|---|---|---|
| style | SalNumber |
Returns: SalBoolean.
SetText(text)
Assigns the control's displayed text.
| Parameter | Type | Description |
|---|---|---|
| text | SalString | The text to assign. |
Returns: SalBoolean. True if the translated control exists and assignment completes; otherwise, false.
An empty string is passed as null when assigning combo-box text.
SetTimer(idEvent, elapseMilliSec)
Creates or updates a native window timer for this control.
| Parameter | Type | Description |
|---|---|---|
| idEvent | SalNumber | The timer identifier. |
| elapseMilliSec | SalNumber | The requested interval in milliseconds. |
Returns: SalBoolean. True if the native timer was created; otherwise, false.
SetWindowColor(nColorIndex, nColor)
Assigns a window or table-cell color.
| Parameter | Type | Description |
|---|---|---|
| nColorIndex | SalNumber | The Sys.COLOR_Index* component to change. |
| nColor | SalNumber | The SAL color value to translate and assign. |
Returns: SalBoolean. True for a supported color index and resolved control; otherwise, false.
Cell colors apply only to table columns. Window colors on table windows also update their grid styles.
ShowOutline(level)
| Parameter | Type | Description |
|---|---|---|
| level | SalNumber |
Returns: SalBoolean.
ShowWindow()
Shows this control or table column.
Returns: SalBoolean. The visibility state before the operation, or false if the control cannot be resolved.
ShowWindowAndLabel()
Shows this control and its associated label.
Returns: SalBoolean. The control's visibility before the operation, or false if it cannot be resolved.
TrackPopupMenu(menuName, flags, x, y)
Creates and displays a temporary popup menu at screen coordinates.
| Parameter | Type | Description |
|---|---|---|
| menuName | SalString | The menu type name to resolve. |
| flags | SalNumber | SAL TPM_* alignment and cursor-position flags; center alignment and TPM_ContextMenu are unsupported. |
| x | SalNumber | The screen X coordinate, unless TPM_CursorX selects the cursor position. |
| y | SalNumber | The screen Y coordinate, unless TPM_CursorY selects the cursor position. |
Returns: SalBoolean. True after the popup is shown; false when the target or menu cannot be resolved.
The previous context menu is restored after display and the temporary menu is queued for disposal.
TrackPopupMenu(menuType, nFlags, nX, nY)
Creates and displays a popup menu for this outline.
| Parameter | Type | Description |
|---|---|---|
| menuType | Type | The menu type to instantiate. |
| nFlags | SalNumber | The popup tracking flags. |
| nX | SalNumber | The horizontal popup position, in pixels. |
| nY | SalNumber | The vertical popup position, in pixels. |
Returns: SalBoolean. The result returned by SalWindow.TrackPopupMenu.
UpdateWindow()
Requests an update of this control.
Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
WinHelp(file, command, numData, strData)
Invokes the legacy Windows Help API for this control.
| Parameter | Type | Description |
|---|---|---|
| file | SalString | The help file path. |
| command | SalNumber | The Sys.HELP_* command. |
| numData | SalNumber | The numeric topic or index for HELP_Context and HELP_SetIndex. |
| strData | SalString | The lookup text for HELP_Key. |
Returns: SalBoolean. The native help result, or false for an empty file name.
WndProc(m)
Processes tree notifications and mouse presses, and routes other native messages through the SAL window adapter.
| Parameter | Type | Description |
|---|---|---|
| m | Message | The native message and its mutable result. |
Yield()
Dispatches one pending message for this window, or processes application messages when no window handle exists.
Message dispatch can reenter application code.
Events
MessageActions
SalMessageHandler Occurs when the SAL adapter dispatches a message to registered handlers.
WindowActions
WindowActionsEventHandler Occurs when this control dispatches a SAL or custom window action.
Inherited By
| Name | Description |
|---|---|
| VisDesktopListBox | Displays a desktop-style outline of drives and directories. |
| VisDirTreeListBox | Displays a directory hierarchy as an outline. |
Implements
| Name | Description |
|---|---|
| ISalControl | |
| ISalListControl | |
| ISalWindow |