VisListBoxExtension
Namespace: PPJ.Runtime.Vis
Assembly: PPJ.Web.Vis.50 (5.0.0.0)
Implements Visual Toolchest item styling and outline operations for a delegated list, combo box, or tree control.
- C#
- VB.NET
public class VisListBoxExtension : SalGeneralWindow
Public Class VisListBoxExtension
Inherits SalGeneralWindow
Ordinary item operations use zero-based indices. Outline operations distinguish visible-list indices from persistent node handles; -1 denotes the root index. Obtain the existing extension through a control conversion rather than creating a second extension for the same control.
Example:
public static class ExtendedListExample
{
public static void Populate()
{
var list = new PPJ.Runtime.Vis.VisColorListBox();
var extension = (PPJ.Runtime.Vis.VisListBoxExtension)(Wisej.Web.Control)list;
extension.AddColorValue("Ready", PPJ.Runtime.Sys.COLOR_Green, 1);
}
}
Constructors
VisListBoxExtension(derived)
Attaches list-selection handling and optional tree-root support to a delegated SAL control.
| Name | Type | Description |
|---|---|---|
| derived | ISalWindow | The list box, combo box, or tree view that uses this extension. |
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 to a target outline as a child or following sibling.
| Parameter | Type | Description |
|---|---|---|
| nSourceIndex | SalNumber | The source node index, or -1 for the root. |
| target | Control | The destination VisOutlineListBox. |
| nTargetIndex | SalNumber | The target node index, or -1 for its root. |
| nDropMode | SalNumber | Use Vis.DROP_Child or Vis.DROP_Sibling. |
Returns: SalBoolean. True if the move completes; false for an invalid target, unsupported mode, self-drop, or drop into 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 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.
If the node does not become expanded, its lazy-load flag is cleared.
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)
Disposes a node's descendants and then the node itself, except for the synthetic root.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline node handle. |
Returns: SalBoolean. True if the handle resolves to a node; otherwise, false.
FreeDescendents(hItem)
Clears and disposes a node's child collection.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline node handle. |
Returns: SalBoolean. True if the handle resolves to a node; otherwise, false.
FromHandle(hWnd)
Resolves a control handle and retrieves its list extension.
| Parameter | Type | Description |
|---|---|---|
| hWnd | SalWindowHandle | The handle to resolve. |
Returns: VisListBoxExtension. The compatible control's extension, or null when unavailable.
FromItemHandle(handle)
Retrieves the list extension associated with an outline node's owning tree.
| Parameter | Type | Description |
|---|---|---|
| handle | SalNumber | The outline node handle. |
Returns: VisListBoxExtension. The tree's extension, or null for an invalid node handle.
A non-root node must remain attached to a tree.
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.
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.
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 child nodes from parallel arrays while batching tree updates.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The parent node handle; the root adds top-level nodes. |
| hPicNormal | SalNumber | The normal-state picture handle. |
| hPicSelect | SalNumber | The selected-state picture handle. |
| sTexts | SalArray<SalString> | The labels, indexed from zero through Count minus one. |
| nValues | SalArray<SalNumber> | The corresponding numeric values at the same indices. |
| nItemFlags | SalArray<SalNumber> | The corresponding node flags at the same indices. |
Returns: SalNumber. The number of labels processed, or -1 for an unavailable tree or parent.
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 the indexed outline node after its next sibling, preserving selection.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The visible-list node index. |
Returns: SalBoolean. True when the node is found, including when it is already last; otherwise, false.
MoveUp(nIndex)
Moves the indexed outline node before its previous sibling, preserving selection.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The visible-list node index. |
Returns: SalBoolean. True when the node is found, including when it is already first; otherwise, false.
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.
SetItemColor(hItem, nColor)
Assigns an outline node's foreground color.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline node handle. |
| nColor | SalNumber | The new foreground color. |
Returns: SalBoolean. True for a resolved node, including a root no-op; otherwise, false.
SetItemData(hItem, sText, nValue, nItemFlags)
Replaces a node's text, application value, and flags while preserving its disabled state.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline node handle. |
| sText | SalString | The new label. |
| nValue | SalNumber | The new application value. |
| nItemFlags | SalNumber | The replacement flags; the disabled bit remains set for a disabled node. |
Returns: SalNumber. The input handle on success or for a root no-op; zero for an invalid handle.
SetItemFlags(hItem, nFlags, bState)
Sets or clears selected flag bits on an attached outline node.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline node handle. |
| nFlags | SalNumber | The bits to modify. |
| bState | SalBoolean | True to set the bits; false to clear them. |
Returns: SalBoolean. True for a valid attached node, including a root no-op; otherwise, false.
SetItemFont(hItem, hFont)
Assigns an outline node's font handle.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline node handle. |
| hFont | SalNumber | The new font handle. |
Returns: SalBoolean. True for a resolved node, including a root no-op; otherwise, false.
SetItemPicture(hItem, hPicNormal, hPicSelected)
Assigns an outline node's normal and selected pictures.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline node handle. |
| hPicNormal | SalNumber | The normal-state picture handle. |
| hPicSelected | SalNumber | The selected-state picture handle. |
Returns: SalBoolean. True for a resolved node in a delegated tree, including a root no-op; otherwise, false.
SetItemText(hItem, sText)
Assigns an outline node's label.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline node handle. |
| sText | SalString | The new node text. |
Returns: SalBoolean. True for a resolved node, including a root no-op; otherwise, false.
SetItemValue(hItem, nValue)
Assigns an outline node's application value.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The outline node handle. |
| nValue | SalNumber | The new application value. |
Returns: SalBoolean. True for a resolved node, including a root no-op; otherwise, false.
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 requested depth while preserving the selected node.
| Parameter | Type | Description |
|---|---|---|
| nLevel | SalNumber | The expansion depth, or Vis.SHOW_AllLevels to expand everything. Nonpositive values collapse the outline. |
Returns: SalBoolean. True for a delegated tree; otherwise, false.
The selected node is made visible afterward and may require expansion beyond the requested depth.
Implements
| Name | Description |
|---|---|
| ISalWindow |