VisListBoxExtension
Namespace: PPJ.Runtime.Vis
Assembly: PPJ.Runtime.Vis.50 (5.0.0.0)
Adds Visual Toolchest item, drawing, and outline operations to a SAL list control.
- C#
- VB.NET
public class VisListBoxExtension : SalGeneralWindow
Public Class VisListBoxExtension
Inherits SalGeneralWindow
Wraps an ISalWindow. List boxes and combo boxes are configured for variable-height owner drawing; tree controls use an internal root node.
Example:
using PPJ.Runtime.Vis;
public static class ListExample
{
public static void Populate(VisListBoxBase list)
{
list.AddColor("First item", PPJ.Runtime.Sys.COLOR_Red);
}
}
Constructors
VisListBoxExtension(derived)
Attaches Visual Toolchest behavior to a SAL control.
| Name | Type | Description |
|---|---|---|
| derived | ISalWindow | The list box, combo box, or tree to extend. |
Subscribes to drawing and selection events and enables variable-height owner drawing for list and combo boxes.
Fields
| Name | Type | Description | Value |
|---|---|---|---|
| hFont | SalNumber | Stores the legacy font-handle variable exposed to translated Visual Toolchest code. | |
| hItem | SalNumber | Stores the legacy outline-item handle exposed to translated Visual Toolchest code. | |
| hPicNormal | SalNumber | Stores the legacy normal-picture handle exposed to translated Visual Toolchest code. | |
| hPicSelect | SalNumber | Stores the legacy selected-picture handle exposed to translated Visual Toolchest code. | |
| nColor | SalNumber | Stores the legacy item-color variable exposed to translated Visual Toolchest code. | |
| nFlags | SalNumber | Stores the legacy general flags exposed to translated Visual Toolchest code. | |
| nIdx | SalNumber | Stores the legacy auxiliary index exposed to translated Visual Toolchest code. | |
| nIndex | SalNumber | Stores the legacy item-index variable exposed to translated Visual Toolchest code. | |
| nItemFlags | SalNumber | Stores the legacy item-flags variable exposed to translated Visual Toolchest code. | |
| nLevel | SalNumber | Stores the legacy outline-depth variable exposed to translated Visual Toolchest code. | |
| nStyle | SalNumber | Stores the legacy style-flag variable exposed to translated Visual Toolchest code. | |
| nValue | SalNumber | Stores the legacy item-value variable exposed to translated Visual Toolchest code. | |
| sText | SalString | Stores the legacy item-text variable exposed to translated Visual Toolchest code. |
Methods
AddColor(sText, nColor)
Adds an extended list item with text color.
| Parameter | Type | Description |
|---|---|---|
| sText | SalString | The displayed item text. |
| nColor | SalNumber | The SAL text color. |
Returns: SalNumber. The inserted item index, or Sys.LB_Err when the delegated control lacks SAL list support.
AddColorValue(sText, nColor, nValue)
Adds an extended list item with text color and an application value.
| Parameter | Type | Description |
|---|---|---|
| sText | SalString | The displayed item text. |
| nColor | SalNumber | The SAL text color. |
| nValue | SalNumber | The application-defined numeric item value. |
Returns: SalNumber. The inserted item index, or Sys.LB_Err when the delegated control lacks SAL list support.
AddFont(sText, hFont)
Adds an extended list item with font handle.
| Parameter | Type | Description |
|---|---|---|
| sText | SalString | The displayed item text. |
| hFont | SalNumber | The font handle to associate with the item. |
Returns: SalNumber. The inserted item index, or Sys.LB_Err when the delegated control lacks SAL list support.
AddFontValue(sText, hFont, nValue)
Adds an extended list item with font handle and an application value.
| Parameter | Type | Description |
|---|---|---|
| sText | SalString | The displayed item text. |
| hFont | SalNumber | The font handle to associate with the item. |
| nValue | SalNumber | The application-defined numeric item value. |
Returns: SalNumber. The inserted item index, or Sys.LB_Err when the delegated control lacks SAL list support.
AddPicture(sText, hPicNormal, hPicSelected)
Adds an extended list item with normal and selected pictures.
| Parameter | Type | Description |
|---|---|---|
| sText | SalString | The displayed item text. |
| hPicNormal | SalNumber | The normal-state picture handle. |
| hPicSelected | SalNumber | The selected-state picture handle. |
Returns: SalNumber. The inserted item index, or Sys.LB_Err when the delegated control lacks SAL list support.
AddPictureValue(sText, hPicNormal, hPicSelected, nValue)
Adds an extended list item with normal and selected pictures and an application value.
| Parameter | Type | Description |
|---|---|---|
| sText | SalString | The displayed item text. |
| hPicNormal | SalNumber | The normal-state picture handle. |
| hPicSelected | SalNumber | The selected-state picture handle. |
| nValue | SalNumber | The application-defined numeric item value. |
Returns: SalNumber. The inserted item index, or Sys.LB_Err when the delegated control lacks SAL list support.
Collapse(nIndex)
Collapses the outline node at a visible-list index.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The visible-list node index. |
Returns: SalBoolean. True if the tree and node are found; otherwise, false.
DeleteChild(nIndex)
Removes the indexed outline node and its subtree from the tree.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The visible-list node index. |
Returns: SalNumber. The remaining total node count, or Sys.LB_Err for an unavailable node or the root.
DeleteDescendents(nIndex)
Clears the child subtree of the indexed outline node.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The visible-list node index. |
Returns: SalNumber. Zero if there were no child nodes; otherwise, the remaining total node count. Returns Sys.LB_Err for an unavailable node or the root.
Demote(nIndex, hPicNormal, hPicSelected)
Moves an outline node under its previous sibling and expands the new parent.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The visible-list node index. |
| hPicNormal | SalNumber | The new parent's normal picture, used only when it previously had no children. |
| hPicSelected | SalNumber | The corresponding selected picture. |
Returns: SalBoolean. True if the node has a previous sibling and can be moved; otherwise, false.
DisableItem(nIndex, nColor)
Marks an extended list item disabled and assigns its text color.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The zero-based list item index. |
| nColor | SalNumber | The SAL text color. |
Returns: SalNumber. Zero on success; Sys.LB_Err if the list or extended item is unavailable.
DoDragDrop(nSourceIndex, target, nTargetIndex, nDropMode)
Moves an outline node into another outline tree.
| Parameter | Type | Description |
|---|---|---|
| nSourceIndex | SalNumber | The source item index. |
| target | Control | The destination VisOutlineListBox. |
| nTargetIndex | SalNumber | The destination item index. |
| nDropMode | 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(nIndex, nColor)
Marks an extended list item enabled and assigns its text color.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The zero-based list item index. |
| nColor | SalNumber | The SAL text color. |
Returns: SalNumber. Zero on success; Sys.LB_Err if the list or extended item is unavailable.
EnumChildren(hItem, hItems)
Copies immediate child node handles into a dynamic SAL array.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline node handle. |
| hItems | SalArray<SalNumber> | The output array, made dynamic and reset before enumeration. |
Returns: SalNumber. The number of handles copied, or -1 for an unavailable tree or node.
The root handle enumerates from the tree's top-level nodes.
EnumDescendents(hItem, hItems)
Copies descendant node handles into a dynamic SAL array.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline node handle. |
| hItems | SalArray<SalNumber> | The output array, made dynamic and reset before enumeration. |
Returns: SalNumber. The number of handles copied, or -1 for an unavailable tree or node.
The root handle enumerates from the tree's top-level nodes.
Expand(nIndex)
Expands an outline item while preserving the visible top node.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The item index. |
Returns: SalBoolean. True if the item expands; otherwise, false.
Disables lazy loading when expansion fails. The horizontal scroll position is reset to zero when restoring the top node.
ExpandDescendents(nIndex)
Expands the indexed outline node and all its descendants.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The visible-list node index. |
Returns: SalBoolean. True if the tree and node are found; otherwise, false.
FindItemValue(hItem, nValue)
Searches an outline subtree for a node with the specified application value.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node whose descendants are searched; the root searches the whole tree. |
| nValue | SalNumber | The numeric item value to find. |
Returns: SalNumber. The matching node handle, or zero when no match or valid starting node exists.
FreeChild(hItem)
Releases an outline node and all of its descendants.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The parent or item handle. |
Returns: SalBoolean. True for a resolved handle; otherwise, false.
The internal root itself is retained; its descendants are released.
FreeDescendents(hItem)
Releases all descendants of an outline node.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The parent or item handle. |
Returns: SalBoolean. True for a resolved handle; otherwise, false.
Each descendant handle is freed and its node removed from the tree.
FromHandle(hWnd)
Resolves the extension associated with a window handle.
| Parameter | Type | Description |
|---|---|---|
| hWnd | SalWindowHandle | The window handle. |
Returns: VisListBoxExtension. The VisListBoxExtension obtained by converting the resolved control, or null if unavailable.
FromItemHandle(handle)
Resolves the extension that owns an outline node.
| Parameter | Type | Description |
|---|---|---|
| handle | SalNumber | The item handle, including the internal root. |
Returns: VisListBoxExtension. The owning extension, or null for an unresolved or detached node.
GetChildNodeCount(hItem, bDirectChildrenOnly)
Counts a tree node's children.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle, including the internal root. |
| bDirectChildrenOnly | SalBoolean | True to count immediate children; false to include descendants. |
Returns: SalNumber. The count, or -1 for an incompatible control or unresolved handle.
GetColor(nIndex)
Gets an extended list item's text color.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The zero-based list item index. |
Returns: SalNumber. The text color, or Sys.LB_Err when the item is unavailable.
GetFlags(nIndex)
Gets the flags of an extended list item by index.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The zero-based list item index. |
Returns: SalNumber. The item flags, or Sys.LB_Err when the item is unavailable.
GetFont(nIndex)
Gets an extended list item's font handle.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The zero-based list item index. |
Returns: SalNumber. The font handle, or Sys.LB_Err when the item is unavailable.
GetIndexFromPoint(nXPos, nYPos)
Finds the list or outline item at client coordinates.
| Parameter | Type | Description |
|---|---|---|
| nXPos | SalNumber | The horizontal coordinate in pixels. |
| nYPos | SalNumber | The vertical coordinate in pixels. |
Returns: SalNumber. The item index, or LB_Err for an unsupported control or a point without an item.
GetItemColor(hItem)
Reads an outline node's foreground color as a Win32 color value.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline node handle. |
Returns: SalNumber. The color value, zero for the root, or Sys.LB_Err for an invalid handle.
GetItemData(hItem, sText, nValue, nItemFlags)
Reads an outline node's text, application value, and flags.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline node handle. |
| sText | SalString | Receives the node text. |
| nValue | SalNumber | Receives the application value. |
| nItemFlags | SalNumber | Receives the node flags. |
Returns: SalBoolean. True if the handle resolves; false otherwise. The root returns empty text and zero values.
GetItemFlags(hItem)
Reads an outline node's item flags.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline node handle. |
Returns: SalNumber. The flags, or zero for the root, an invalid handle, or a detached node.
GetItemFont(hItem)
Reads an outline node's font handle.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline node handle. |
Returns: SalNumber. The font handle, zero for the root, or Sys.LB_Err for an invalid handle.
GetItemHandle(nIndex)
Resolves a visible-list node index to its outline handle.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The node index, or -1 for the root. |
Returns: SalNumber. The node handle, or zero if it cannot be resolved.
GetItemIndex(hItem)
Resolves an outline handle to its current list index.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline node handle. |
Returns: SalNumber. The node's list index, -1 for the root, or Sys.LB_Err when resolution fails.
GetItemPicture(hItem, hPicNormal, hPicSelected)
Reads an outline node's picture handles.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline node handle. |
| hPicNormal | SalNumber | Receives the normal picture handle. |
| hPicSelected | SalNumber | Receives the selected picture handle for a non-root node. |
Returns: SalBoolean. True for a resolved node and false for an invalid handle.
For the root, the normal output is zero but the selected output is left unchanged; the legacy hPicSelect field is cleared instead. A missing SAL list interface returns the numeric LB_Err converted to SalBoolean.
GetItemText(hItem)
Gets an outline node's displayed text.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline node handle. |
Returns: SalString. The node text, or an empty string when the list or node is unavailable.
GetItemValue(hItem)
Gets an outline node's application value.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline node handle. |
Returns: SalNumber. The node value, or zero when the list or node is unavailable.
GetLevel(hItem)
Counts the parent nodes above an outline node.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline node handle. |
Returns: SalNumber. Zero for a top-level node, the nesting depth for other nodes, or -1 for the root or an invalid handle.
GetNextSibling(hItem)
Gets an outline node's next sibling handle.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline node handle. |
Returns: SalNumber. The sibling handle, or zero for the root, an invalid handle, or no sibling.
GetParent(hItem)
Gets an outline node's parent handle.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline node handle. |
Returns: SalNumber. The parent handle, the synthetic root for a top-level node, or zero for the root or an invalid handle.
GetPicture(nIndex, hPicNormal, hPicSelected)
Reads an extended list item's two picture handles.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The zero-based list item index. |
| hPicNormal | SalNumber | Receives the normal-state picture handle. |
| hPicSelected | SalNumber | Receives the selected-state picture handle. |
Returns: SalNumber. Zero on success; Sys.LB_Err if the item is unavailable.
GetPrevSibling(hItem)
Gets an outline node's previous sibling handle.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline node handle. |
Returns: SalNumber. The sibling handle, or zero for the root, an invalid handle, or no sibling.
GetRoot()
Gets the synthetic root handle for the delegated tree.
Returns: SalNumber. The root handle, or zero when the extension has no tree root.
GetStyle()
Gets the supported Visual Toolchest style bits of the delegated control.
Returns: SalNumber. The Vis-extension flag for supported lists, plus the explorer flag for a tree with expand/collapse buttons; zero for unsupported controls.
GetTextRectangle(nIndex, nTop, nLeft, nBottom, nRight)
Retrieves an outline item's text bounds.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The item index. |
| nTop | SalNumber | Receives the top edge in pixels. |
| nLeft | SalNumber | Receives the left edge in pixels. |
| nBottom | SalNumber | Receives the bottom edge in pixels. |
| nRight | SalNumber | Receives the right edge in pixels. |
Returns: SalBoolean. True for a resolved item; otherwise, false.
InsertColor(nIndex, sText, nColor)
Inserts an extended list item with text color.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The requested insertion position; -1 appends through the SAL list contract. |
| sText | SalString | The displayed item text. |
| nColor | SalNumber | The SAL text color. |
Returns: SalNumber. The list insertion result, or Sys.LB_Err when the delegated control lacks SAL list support.
InsertColorValue(nIndex, sText, nColor, nValue)
Inserts an extended list item with text color and an application value.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The requested insertion position; -1 appends through the SAL list contract. |
| sText | SalString | The displayed item text. |
| nColor | SalNumber | The SAL text color. |
| nValue | SalNumber | The application-defined numeric item value. |
Returns: SalNumber. The list insertion result, or Sys.LB_Err when the delegated control lacks SAL list support.
InsertFont(nIndex, sText, hFont)
Inserts an extended list item with font handle.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The requested insertion position; -1 appends through the SAL list contract. |
| sText | SalString | The displayed item text. |
| hFont | SalNumber | The font handle to associate with the item. |
Returns: SalNumber. The list insertion result, or Sys.LB_Err when the delegated control lacks SAL list support.
InsertFontValue(nIndex, sText, hFont, nValue)
Inserts an extended list item with font handle and an application value.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The requested insertion position; -1 appends through the SAL list contract. |
| sText | SalString | The displayed item text. |
| hFont | SalNumber | The font handle to associate with the item. |
| nValue | SalNumber | The application-defined numeric item value. |
Returns: SalNumber. The list insertion result, or Sys.LB_Err when the delegated control lacks SAL list support.
InsertPicture(nIndex, sText, hPicNormal, hPicSelected)
Inserts an extended list item with normal and selected pictures.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The requested insertion position; -1 appends through the SAL list contract. |
| sText | SalString | The displayed item text. |
| hPicNormal | SalNumber | The normal-state picture handle. |
| hPicSelected | SalNumber | The selected-state picture handle. |
Returns: SalNumber. The list insertion result, or Sys.LB_Err when the delegated control lacks SAL list support.
InsertPictureValue(nIndex, sText, hPicNormal, hPicSelected, nValue)
Inserts an extended list item with normal and selected pictures and an application value.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The requested insertion position; -1 appends through the SAL list contract. |
| sText | SalString | The displayed item text. |
| hPicNormal | SalNumber | The normal-state picture handle. |
| hPicSelected | SalNumber | The selected-state picture handle. |
| nValue | SalNumber | The application-defined numeric item value. |
Returns: SalNumber. The list insertion result, or Sys.LB_Err when the delegated control lacks SAL list support.
LoadChild(hItem, hPicNormal, hPicSelected, sText, nValue, nItemFlags)
Appends a new node under an outline parent.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The parent handle; the root adds a top-level node. |
| hPicNormal | SalNumber | The normal-state picture handle. |
| hPicSelected | SalNumber | The selected-state picture handle. |
| sText | SalString | The new node label. |
| nValue | SalNumber | The application-defined numeric value. |
| nItemFlags | SalNumber | The initial item flags, applied after insertion. |
Returns: SalNumber. The new node handle, or zero for an unavailable tree or parent.
LoadChildren(hItem, hPicNormal, hPicSelect, sTexts, nValues, nItemFlags)
Appends outline children from parallel arrays.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The parent handle; the internal root adds top-level nodes. |
| hPicNormal | SalNumber | The normal picture handle shared by all children. |
| hPicSelect | SalNumber | The selected picture handle shared by all children. |
| sTexts | SalArray<SalString> | Child captions indexed from zero. |
| nValues | SalArray<SalNumber> | Child numeric values indexed from zero. |
| nItemFlags | SalArray<SalNumber> | Child ITEM_ flags indexed from zero. |
Returns: SalNumber. The caption count, zero for empty captions, or -1 for an incompatible control or invalid parent.
All arrays must provide entries for each caption. Nodes are inserted before flags and pictures are assigned.
LoadChildren(hItem, hPicNormal, hPicSelect, sTexts, nValues, nItemFlags)
Appends outline children from parallel arrays.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The parent handle; the internal root adds top-level nodes. |
| hPicNormal | SalArray<SalNumber> | Normal picture handles indexed from zero. |
| hPicSelect | SalArray<SalNumber> | Selected picture handles indexed from zero. |
| sTexts | SalArray<SalString> | Child captions indexed from zero. |
| nValues | SalArray<SalNumber> | Child numeric values indexed from zero. |
| nItemFlags | SalArray<SalNumber> | Child ITEM_ flags indexed from zero. |
Returns: SalNumber. The caption count, zero for empty captions, or -1 for an incompatible control or invalid parent.
All arrays must provide entries for each caption. Nodes are inserted before flags and pictures are assigned.
LoadOutline(xml)
Loads outline nodes from an XML string through the delegated outline control.
| Parameter | Type | Description |
|---|---|---|
| xml | SalString | The outline XML accepted by VisOutlineListBox.LoadFromXmlString. |
Returns: SalNumber. Zero after loading, or Sys.LB_Err when the owner is not a VisOutlineListBox.
LoadOutlineFile(sFileName, hPicParentNormal, hPicParentSelect, hPicChildNormal, hPicChildSelect)
Logs that loading an outline file is not implemented.
| Parameter | Type | Description |
|---|---|---|
| sFileName | SalString | The requested file name; ignored. |
| hPicParentNormal | SalNumber | The requested parent normal image; ignored. |
| hPicParentSelect | SalNumber | The requested parent selected image; ignored. |
| hPicChildNormal | SalNumber | The requested child normal image; ignored. |
| hPicChildSelect | SalNumber | The requested child selected image; ignored. |
Returns: SalNumber. Always zero.
LoadSibling(hItemBefore, hPicNormal, hPicSelected, sText, nValue, nItemFlags)
Inserts a new node immediately after an existing sibling.
| Parameter | Type | Description |
|---|---|---|
| hItemBefore | SalNumber | The preceding sibling handle; the root is not accepted. |
| hPicNormal | SalNumber | The normal-state picture handle. |
| hPicSelected | SalNumber | The selected-state picture handle. |
| sText | SalString | The new node label. |
| nValue | SalNumber | The application-defined numeric value. |
| nItemFlags | SalNumber | The initial item flags, applied after insertion. |
Returns: SalNumber. The new node handle, or zero when the tree or preceding sibling is unavailable.
MoveDown(nIndex)
Moves an outline item one sibling position down.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The item index. |
Returns: SalBoolean. True if moved; false for an invalid item, incompatible control, or an item already at that end of its siblings.
Restores the node's selection after reinsertion.
MoveUp(nIndex)
Moves an outline item one sibling position up.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The item index. |
Returns: SalBoolean. True if moved; false for an invalid item, incompatible control, or an item already at that end of its siblings.
Restores the node's selection after reinsertion.
Promote(nIndex, hPicNormal, hPicSelected)
Moves an outline node to the end of its grandparent's child collection.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The visible-list node index. |
| hPicNormal | SalNumber | The former parent's normal picture, used if it no longer has children. |
| hPicSelected | SalNumber | The corresponding selected picture. |
Returns: SalBoolean. True if the node has a parent and can be moved; otherwise, false.
SaveOutline(xml)
Serializes the delegated outline control to XML.
| Parameter | Type | Description |
|---|---|---|
| xml | SalString | Receives the serialized outline on success. |
Returns: SalNumber. Zero on success, or Sys.LB_Err when the owner is not a VisOutlineListBox.
SetColor(nIndex, nColor)
Assigns an extended list item's text color.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The zero-based list item index. |
| nColor | SalNumber | The SAL text color. |
Returns: SalBoolean. True if the extended item is found; otherwise, false.
SetFlags(nIndex, nFlags, bState)
Sets or clears selected bits in an extended list item's flags.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The zero-based list item index. |
| nFlags | SalNumber | The bit mask to change. |
| bState | SalBoolean | True to set the bits; false to clear them. |
Returns: SalBoolean. True when an extended item is found; otherwise, false.
SetFont(nIndex, hFont)
Assigns an extended list item's font handle.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The zero-based list item index. |
| hFont | SalNumber | The font handle to associate with the item. |
Returns: SalBoolean. True if the extended item is found; otherwise, false.
SetIndent(nWidth)
Changes the indentation between outline levels.
| Parameter | Type | Description |
|---|---|---|
| nWidth | SalNumber | The indentation width in pixels. |
Returns: SalBoolean. True for a tree control; otherwise, false.
SetItemColor(hItem, nColor)
Changes an outline item's text color.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The item handle. |
| nColor | SalNumber | The SAL color value. |
Returns: SalBoolean. True for a resolved supported item; otherwise, false.
The internal root is accepted without changing its value.
SetItemData(hItem, sText, nValue, nItemFlags)
Updates an outline item's text, numeric value, and flags.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The item handle. |
| sText | SalString | The new caption. |
| nValue | SalNumber | The new numeric value. |
| nItemFlags | SalNumber | The replacement ITEM_ flags. |
Returns: SalNumber. The item handle, or zero if it cannot be resolved.
The internal root is unchanged. An existing disabled state is preserved.
SetItemFlags(hItem, nFlags, bState)
Sets or clears selected outline item flags.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The item handle. |
| nFlags | SalNumber | The ITEM_ bit mask. |
| bState | SalBoolean | True to set the bits; false to clear them. |
Returns: SalBoolean. False for an unresolved or detached node; otherwise, true.
The internal root is accepted without changing flags.
SetItemFont(hItem, hFont)
Changes an outline item's font.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The item handle. |
| hFont | SalNumber | The registered font handle. |
Returns: SalBoolean. True for a resolved supported item; otherwise, false.
The internal root is accepted without changing its value.
SetItemPicture(hItem, hPicNormal, hPicSelected)
Changes an outline item's pictures.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The item handle. |
| hPicNormal | SalNumber | The normal picture handle. |
| hPicSelected | SalNumber | The selected picture handle. |
Returns: SalBoolean. True for a resolved supported item; otherwise, false.
The internal root is accepted without changing its value.
SetItemText(hItem, sText)
Changes an outline item's caption.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The item handle. |
| sText | SalString | The new caption. |
Returns: SalBoolean. True for a resolved supported item; otherwise, false.
The internal root is accepted without changing its value.
SetItemValue(hItem, nValue)
Changes an outline item's numeric value.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The item handle. |
| nValue | SalNumber | The numeric value. |
Returns: SalBoolean. True for a resolved supported item; otherwise, false.
The internal root is accepted without changing its value.
SetOutlineRedraw(bRedraw)
Begins or ends a batch of outline updates.
| Parameter | Type | Description |
|---|---|---|
| bRedraw | SalBoolean | False calls BeginUpdate; true calls EndUpdate. |
Returns: SalBoolean. True for a delegated tree; otherwise, false.
Balance disabled redraw with an enabled redraw call.
SetPicture(nIndex, hPicNormal, hPicSelected)
Assigns an extended list item's two picture handles.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The zero-based list item index. |
| hPicNormal | SalNumber | The normal-state picture handle. |
| hPicSelected | SalNumber | The selected-state picture handle. |
Returns: SalNumber. One if the item is found; zero otherwise.
SetStyle(nStyle)
Applies the supported Visual Toolchest style bits to the delegated control.
| Parameter | Type | Description |
|---|---|---|
| nStyle | SalNumber | The requested style bit mask. |
Returns: SalBoolean. True for a tree, list box, or combo box; otherwise, false.
Only a tree's LBS_Explorer bit changes behavior, by setting ShowPlusMinus. Other style bits and ordinary list/combo styles are accepted without effect.
ShowOutline(nLevel)
Expands an outline to a specified level.
| Parameter | Type | Description |
|---|---|---|
| nLevel | SalNumber | The number of levels to expand; zero collapses all nodes, and SHOW_AllLevels expands all. |
Returns: SalBoolean. True for a tree control; otherwise, false.
Restores the previous selected node and attempts to preserve its visibility or the previous top node.
Implements
| Name | Description |
|---|---|
| ISalWindow |