Skip to main content

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.

public class VisListBoxExtension : 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

Instance member VisListBoxExtension(derived)

Attaches Visual Toolchest behavior to a SAL control.

NameTypeDescription
derivedISalWindowThe 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

NameTypeDescriptionValue
hFontSalNumberStores the legacy font-handle variable exposed to translated Visual Toolchest code.
hItemSalNumberStores the legacy outline-item handle exposed to translated Visual Toolchest code.
hPicNormalSalNumberStores the legacy normal-picture handle exposed to translated Visual Toolchest code.
hPicSelectSalNumberStores the legacy selected-picture handle exposed to translated Visual Toolchest code.
nColorSalNumberStores the legacy item-color variable exposed to translated Visual Toolchest code.
nFlagsSalNumberStores the legacy general flags exposed to translated Visual Toolchest code.
nIdxSalNumberStores the legacy auxiliary index exposed to translated Visual Toolchest code.
nIndexSalNumberStores the legacy item-index variable exposed to translated Visual Toolchest code.
nItemFlagsSalNumberStores the legacy item-flags variable exposed to translated Visual Toolchest code.
nLevelSalNumberStores the legacy outline-depth variable exposed to translated Visual Toolchest code.
nStyleSalNumberStores the legacy style-flag variable exposed to translated Visual Toolchest code.
nValueSalNumberStores the legacy item-value variable exposed to translated Visual Toolchest code.
sTextSalStringStores the legacy item-text variable exposed to translated Visual Toolchest code.

Methods

Instance member AddColor(sText, nColor)

Adds an extended list item with text color.

ParameterTypeDescription
sTextSalStringThe displayed item text.
nColorSalNumberThe SAL text color.

Returns: SalNumber. The inserted item index, or Sys.LB_Err when the delegated control lacks SAL list support.

Instance member AddColorValue(sText, nColor, nValue)

Adds an extended list item with text color and an application value.

ParameterTypeDescription
sTextSalStringThe displayed item text.
nColorSalNumberThe SAL text color.
nValueSalNumberThe application-defined numeric item value.

Returns: SalNumber. The inserted item index, or Sys.LB_Err when the delegated control lacks SAL list support.

Instance member AddFont(sText, hFont)

Adds an extended list item with font handle.

ParameterTypeDescription
sTextSalStringThe displayed item text.
hFontSalNumberThe 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.

Instance member AddFontValue(sText, hFont, nValue)

Adds an extended list item with font handle and an application value.

ParameterTypeDescription
sTextSalStringThe displayed item text.
hFontSalNumberThe font handle to associate with the item.
nValueSalNumberThe application-defined numeric item value.

Returns: SalNumber. The inserted item index, or Sys.LB_Err when the delegated control lacks SAL list support.

Instance member AddPicture(sText, hPicNormal, hPicSelected)

Adds an extended list item with normal and selected pictures.

ParameterTypeDescription
sTextSalStringThe displayed item text.
hPicNormalSalNumberThe normal-state picture handle.
hPicSelectedSalNumberThe selected-state picture handle.

Returns: SalNumber. The inserted item index, or Sys.LB_Err when the delegated control lacks SAL list support.

Instance member AddPictureValue(sText, hPicNormal, hPicSelected, nValue)

Adds an extended list item with normal and selected pictures and an application value.

ParameterTypeDescription
sTextSalStringThe displayed item text.
hPicNormalSalNumberThe normal-state picture handle.
hPicSelectedSalNumberThe selected-state picture handle.
nValueSalNumberThe application-defined numeric item value.

Returns: SalNumber. The inserted item index, or Sys.LB_Err when the delegated control lacks SAL list support.

Instance member Collapse(nIndex)

Collapses the outline node at a visible-list index.

ParameterTypeDescription
nIndexSalNumberThe visible-list node index.

Returns: SalBoolean. True if the tree and node are found; otherwise, false.

Instance member DeleteChild(nIndex)

Removes the indexed outline node and its subtree from the tree.

ParameterTypeDescription
nIndexSalNumberThe visible-list node index.

Returns: SalNumber. The remaining total node count, or Sys.LB_Err for an unavailable node or the root.

Instance member DeleteDescendents(nIndex)

Clears the child subtree of the indexed outline node.

ParameterTypeDescription
nIndexSalNumberThe 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.

Instance member Demote(nIndex, hPicNormal, hPicSelected)

Moves an outline node under its previous sibling and expands the new parent.

ParameterTypeDescription
nIndexSalNumberThe visible-list node index.
hPicNormalSalNumberThe new parent's normal picture, used only when it previously had no children.
hPicSelectedSalNumberThe corresponding selected picture.

Returns: SalBoolean. True if the node has a previous sibling and can be moved; otherwise, false.

Instance member DisableItem(nIndex, nColor)

Marks an extended list item disabled and assigns its text color.

ParameterTypeDescription
nIndexSalNumberThe zero-based list item index.
nColorSalNumberThe SAL text color.

Returns: SalNumber. Zero on success; Sys.LB_Err if the list or extended item is unavailable.

Instance member DoDragDrop(nSourceIndex, target, nTargetIndex, nDropMode)

Moves an outline node into another outline tree.

ParameterTypeDescription
nSourceIndexSalNumberThe source item index.
targetControlThe destination VisOutlineListBox.
nTargetIndexSalNumberThe destination item index.
nDropModeSalNumberDROP_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.

Instance member EnableItem(nIndex, nColor)

Marks an extended list item enabled and assigns its text color.

ParameterTypeDescription
nIndexSalNumberThe zero-based list item index.
nColorSalNumberThe SAL text color.

Returns: SalNumber. Zero on success; Sys.LB_Err if the list or extended item is unavailable.

Instance member EnumChildren(hItem, hItems)

Copies immediate child node handles into a dynamic SAL array.

ParameterTypeDescription
hItemSalNumberThe outline node handle.
hItemsSalArray<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.

Instance member EnumDescendents(hItem, hItems)

Copies descendant node handles into a dynamic SAL array.

ParameterTypeDescription
hItemSalNumberThe outline node handle.
hItemsSalArray<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.

Instance member Expand(nIndex)

Expands an outline item while preserving the visible top node.

ParameterTypeDescription
nIndexSalNumberThe 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.

Instance member ExpandDescendents(nIndex)

Expands the indexed outline node and all its descendants.

ParameterTypeDescription
nIndexSalNumberThe visible-list node index.

Returns: SalBoolean. True if the tree and node are found; otherwise, false.

Instance member FindItemValue(hItem, nValue)

Searches an outline subtree for a node with the specified application value.

ParameterTypeDescription
hItemSalNumberThe node whose descendants are searched; the root searches the whole tree.
nValueSalNumberThe numeric item value to find.

Returns: SalNumber. The matching node handle, or zero when no match or valid starting node exists.

Instance member FreeChild(hItem)

Releases an outline node and all of its descendants.

ParameterTypeDescription
hItemSalNumberThe parent or item handle.

Returns: SalBoolean. True for a resolved handle; otherwise, false.

The internal root itself is retained; its descendants are released.

Instance member FreeDescendents(hItem)

Releases all descendants of an outline node.

ParameterTypeDescription
hItemSalNumberThe 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.

Static member FromHandle(hWnd)

Resolves the extension associated with a window handle.

ParameterTypeDescription
hWndSalWindowHandleThe window handle.

Returns: VisListBoxExtension. The VisListBoxExtension obtained by converting the resolved control, or null if unavailable.

Static member FromItemHandle(handle)

Resolves the extension that owns an outline node.

ParameterTypeDescription
handleSalNumberThe item handle, including the internal root.

Returns: VisListBoxExtension. The owning extension, or null for an unresolved or detached node.

Instance member GetChildNodeCount(hItem, bDirectChildrenOnly)

Counts a tree node's children.

ParameterTypeDescription
hItemSalNumberThe node handle, including the internal root.
bDirectChildrenOnlySalBooleanTrue to count immediate children; false to include descendants.

Returns: SalNumber. The count, or -1 for an incompatible control or unresolved handle.

Instance member GetColor(nIndex)

Gets an extended list item's text color.

ParameterTypeDescription
nIndexSalNumberThe zero-based list item index.

Returns: SalNumber. The text color, or Sys.LB_Err when the item is unavailable.

Instance member GetFlags(nIndex)

Gets the flags of an extended list item by index.

ParameterTypeDescription
nIndexSalNumberThe zero-based list item index.

Returns: SalNumber. The item flags, or Sys.LB_Err when the item is unavailable.

Instance member GetFont(nIndex)

Gets an extended list item's font handle.

ParameterTypeDescription
nIndexSalNumberThe zero-based list item index.

Returns: SalNumber. The font handle, or Sys.LB_Err when the item is unavailable.

Instance member GetIndexFromPoint(nXPos, nYPos)

Finds the list or outline item at client coordinates.

ParameterTypeDescription
nXPosSalNumberThe horizontal coordinate in pixels.
nYPosSalNumberThe vertical coordinate in pixels.

Returns: SalNumber. The item index, or LB_Err for an unsupported control or a point without an item.

Instance member GetItemColor(hItem)

Reads an outline node's foreground color as a Win32 color value.

ParameterTypeDescription
hItemSalNumberThe outline node handle.

Returns: SalNumber. The color value, zero for the root, or Sys.LB_Err for an invalid handle.

Instance member GetItemData(hItem, sText, nValue, nItemFlags)

Reads an outline node's text, application value, and flags.

ParameterTypeDescription
hItemSalNumberThe outline node handle.
sText by referenceSalStringReceives the node text.
nValue by referenceSalNumberReceives the application value.
nItemFlags by referenceSalNumberReceives the node flags.

Returns: SalBoolean. True if the handle resolves; false otherwise. The root returns empty text and zero values.

Instance member GetItemFlags(hItem)

Reads an outline node's item flags.

ParameterTypeDescription
hItemSalNumberThe outline node handle.

Returns: SalNumber. The flags, or zero for the root, an invalid handle, or a detached node.

Instance member GetItemFont(hItem)

Reads an outline node's font handle.

ParameterTypeDescription
hItemSalNumberThe outline node handle.

Returns: SalNumber. The font handle, zero for the root, or Sys.LB_Err for an invalid handle.

Instance member GetItemHandle(nIndex)

Resolves a visible-list node index to its outline handle.

ParameterTypeDescription
nIndexSalNumberThe node index, or -1 for the root.

Returns: SalNumber. The node handle, or zero if it cannot be resolved.

Instance member GetItemIndex(hItem)

Resolves an outline handle to its current list index.

ParameterTypeDescription
hItemSalNumberThe outline node handle.

Returns: SalNumber. The node's list index, -1 for the root, or Sys.LB_Err when resolution fails.

Instance member GetItemPicture(hItem, hPicNormal, hPicSelected)

Reads an outline node's picture handles.

ParameterTypeDescription
hItemSalNumberThe outline node handle.
hPicNormal by referenceSalNumberReceives the normal picture handle.
hPicSelected by referenceSalNumberReceives 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.

Instance member GetItemText(hItem)

Gets an outline node's displayed text.

ParameterTypeDescription
hItemSalNumberThe outline node handle.

Returns: SalString. The node text, or an empty string when the list or node is unavailable.

Instance member GetItemValue(hItem)

Gets an outline node's application value.

ParameterTypeDescription
hItemSalNumberThe outline node handle.

Returns: SalNumber. The node value, or zero when the list or node is unavailable.

Instance member GetLevel(hItem)

Counts the parent nodes above an outline node.

ParameterTypeDescription
hItemSalNumberThe 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.

Instance member GetNextSibling(hItem)

Gets an outline node's next sibling handle.

ParameterTypeDescription
hItemSalNumberThe outline node handle.

Returns: SalNumber. The sibling handle, or zero for the root, an invalid handle, or no sibling.

Instance member GetParent(hItem)

Gets an outline node's parent handle.

ParameterTypeDescription
hItemSalNumberThe 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.

Instance member GetPicture(nIndex, hPicNormal, hPicSelected)

Reads an extended list item's two picture handles.

ParameterTypeDescription
nIndexSalNumberThe zero-based list item index.
hPicNormal by referenceSalNumberReceives the normal-state picture handle.
hPicSelected by referenceSalNumberReceives the selected-state picture handle.

Returns: SalNumber. Zero on success; Sys.LB_Err if the item is unavailable.

Instance member GetPrevSibling(hItem)

Gets an outline node's previous sibling handle.

ParameterTypeDescription
hItemSalNumberThe outline node handle.

Returns: SalNumber. The sibling handle, or zero for the root, an invalid handle, or no sibling.

Instance member GetRoot()

Gets the synthetic root handle for the delegated tree.

Returns: SalNumber. The root handle, or zero when the extension has no tree root.

Instance member 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.

Instance member GetTextRectangle(nIndex, nTop, nLeft, nBottom, nRight)

Retrieves an outline item's text bounds.

ParameterTypeDescription
nIndexSalNumberThe item index.
nTop by referenceSalNumberReceives the top edge in pixels.
nLeft by referenceSalNumberReceives the left edge in pixels.
nBottom by referenceSalNumberReceives the bottom edge in pixels.
nRight by referenceSalNumberReceives the right edge in pixels.

Returns: SalBoolean. True for a resolved item; otherwise, false.

Instance member InsertColor(nIndex, sText, nColor)

Inserts an extended list item with text color.

ParameterTypeDescription
nIndexSalNumberThe requested insertion position; -1 appends through the SAL list contract.
sTextSalStringThe displayed item text.
nColorSalNumberThe SAL text color.

Returns: SalNumber. The list insertion result, or Sys.LB_Err when the delegated control lacks SAL list support.

Instance member InsertColorValue(nIndex, sText, nColor, nValue)

Inserts an extended list item with text color and an application value.

ParameterTypeDescription
nIndexSalNumberThe requested insertion position; -1 appends through the SAL list contract.
sTextSalStringThe displayed item text.
nColorSalNumberThe SAL text color.
nValueSalNumberThe application-defined numeric item value.

Returns: SalNumber. The list insertion result, or Sys.LB_Err when the delegated control lacks SAL list support.

Instance member InsertFont(nIndex, sText, hFont)

Inserts an extended list item with font handle.

ParameterTypeDescription
nIndexSalNumberThe requested insertion position; -1 appends through the SAL list contract.
sTextSalStringThe displayed item text.
hFontSalNumberThe 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.

Instance member InsertFontValue(nIndex, sText, hFont, nValue)

Inserts an extended list item with font handle and an application value.

ParameterTypeDescription
nIndexSalNumberThe requested insertion position; -1 appends through the SAL list contract.
sTextSalStringThe displayed item text.
hFontSalNumberThe font handle to associate with the item.
nValueSalNumberThe application-defined numeric item value.

Returns: SalNumber. The list insertion result, or Sys.LB_Err when the delegated control lacks SAL list support.

Instance member InsertPicture(nIndex, sText, hPicNormal, hPicSelected)

Inserts an extended list item with normal and selected pictures.

ParameterTypeDescription
nIndexSalNumberThe requested insertion position; -1 appends through the SAL list contract.
sTextSalStringThe displayed item text.
hPicNormalSalNumberThe normal-state picture handle.
hPicSelectedSalNumberThe selected-state picture handle.

Returns: SalNumber. The list insertion result, or Sys.LB_Err when the delegated control lacks SAL list support.

Instance member InsertPictureValue(nIndex, sText, hPicNormal, hPicSelected, nValue)

Inserts an extended list item with normal and selected pictures and an application value.

ParameterTypeDescription
nIndexSalNumberThe requested insertion position; -1 appends through the SAL list contract.
sTextSalStringThe displayed item text.
hPicNormalSalNumberThe normal-state picture handle.
hPicSelectedSalNumberThe selected-state picture handle.
nValueSalNumberThe application-defined numeric item value.

Returns: SalNumber. The list insertion result, or Sys.LB_Err when the delegated control lacks SAL list support.

Instance member LoadChild(hItem, hPicNormal, hPicSelected, sText, nValue, nItemFlags)

Appends a new node under an outline parent.

ParameterTypeDescription
hItemSalNumberThe parent handle; the root adds a top-level node.
hPicNormalSalNumberThe normal-state picture handle.
hPicSelectedSalNumberThe selected-state picture handle.
sTextSalStringThe new node label.
nValueSalNumberThe application-defined numeric value.
nItemFlagsSalNumberThe initial item flags, applied after insertion.

Returns: SalNumber. The new node handle, or zero for an unavailable tree or parent.

Instance member LoadChildren(hItem, hPicNormal, hPicSelect, sTexts, nValues, nItemFlags)

Appends outline children from parallel arrays.

ParameterTypeDescription
hItemSalNumberThe parent handle; the internal root adds top-level nodes.
hPicNormalSalNumberThe normal picture handle shared by all children.
hPicSelectSalNumberThe selected picture handle shared by all children.
sTextsSalArray<SalString>Child captions indexed from zero.
nValuesSalArray<SalNumber>Child numeric values indexed from zero.
nItemFlagsSalArray<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.

Instance member LoadChildren(hItem, hPicNormal, hPicSelect, sTexts, nValues, nItemFlags)

Appends outline children from parallel arrays.

ParameterTypeDescription
hItemSalNumberThe parent handle; the internal root adds top-level nodes.
hPicNormalSalArray<SalNumber>Normal picture handles indexed from zero.
hPicSelectSalArray<SalNumber>Selected picture handles indexed from zero.
sTextsSalArray<SalString>Child captions indexed from zero.
nValuesSalArray<SalNumber>Child numeric values indexed from zero.
nItemFlagsSalArray<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.

Instance member LoadOutline(xml)

Loads outline nodes from an XML string through the delegated outline control.

ParameterTypeDescription
xmlSalStringThe outline XML accepted by VisOutlineListBox.LoadFromXmlString.

Returns: SalNumber. Zero after loading, or Sys.LB_Err when the owner is not a VisOutlineListBox.

Instance member LoadOutlineFile(sFileName, hPicParentNormal, hPicParentSelect, hPicChildNormal, hPicChildSelect)

Logs that loading an outline file is not implemented.

ParameterTypeDescription
sFileNameSalStringThe requested file name; ignored.
hPicParentNormalSalNumberThe requested parent normal image; ignored.
hPicParentSelectSalNumberThe requested parent selected image; ignored.
hPicChildNormalSalNumberThe requested child normal image; ignored.
hPicChildSelectSalNumberThe requested child selected image; ignored.

Returns: SalNumber. Always zero.

Instance member LoadSibling(hItemBefore, hPicNormal, hPicSelected, sText, nValue, nItemFlags)

Inserts a new node immediately after an existing sibling.

ParameterTypeDescription
hItemBeforeSalNumberThe preceding sibling handle; the root is not accepted.
hPicNormalSalNumberThe normal-state picture handle.
hPicSelectedSalNumberThe selected-state picture handle.
sTextSalStringThe new node label.
nValueSalNumberThe application-defined numeric value.
nItemFlagsSalNumberThe initial item flags, applied after insertion.

Returns: SalNumber. The new node handle, or zero when the tree or preceding sibling is unavailable.

Instance member MoveDown(nIndex)

Moves an outline item one sibling position down.

ParameterTypeDescription
nIndexSalNumberThe 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.

Instance member MoveUp(nIndex)

Moves an outline item one sibling position up.

ParameterTypeDescription
nIndexSalNumberThe 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.

Instance member Promote(nIndex, hPicNormal, hPicSelected)

Moves an outline node to the end of its grandparent's child collection.

ParameterTypeDescription
nIndexSalNumberThe visible-list node index.
hPicNormalSalNumberThe former parent's normal picture, used if it no longer has children.
hPicSelectedSalNumberThe corresponding selected picture.

Returns: SalBoolean. True if the node has a parent and can be moved; otherwise, false.

Instance member SaveOutline(xml)

Serializes the delegated outline control to XML.

ParameterTypeDescription
xml by referenceSalStringReceives the serialized outline on success.

Returns: SalNumber. Zero on success, or Sys.LB_Err when the owner is not a VisOutlineListBox.

Instance member SetColor(nIndex, nColor)

Assigns an extended list item's text color.

ParameterTypeDescription
nIndexSalNumberThe zero-based list item index.
nColorSalNumberThe SAL text color.

Returns: SalBoolean. True if the extended item is found; otherwise, false.

Instance member SetFlags(nIndex, nFlags, bState)

Sets or clears selected bits in an extended list item's flags.

ParameterTypeDescription
nIndexSalNumberThe zero-based list item index.
nFlagsSalNumberThe bit mask to change.
bStateSalBooleanTrue to set the bits; false to clear them.

Returns: SalBoolean. True when an extended item is found; otherwise, false.

Instance member SetFont(nIndex, hFont)

Assigns an extended list item's font handle.

ParameterTypeDescription
nIndexSalNumberThe zero-based list item index.
hFontSalNumberThe font handle to associate with the item.

Returns: SalBoolean. True if the extended item is found; otherwise, false.

Instance member SetIndent(nWidth)

Changes the indentation between outline levels.

ParameterTypeDescription
nWidthSalNumberThe indentation width in pixels.

Returns: SalBoolean. True for a tree control; otherwise, false.

Instance member SetItemColor(hItem, nColor)

Changes an outline item's text color.

ParameterTypeDescription
hItemSalNumberThe item handle.
nColorSalNumberThe SAL color value.

Returns: SalBoolean. True for a resolved supported item; otherwise, false.

The internal root is accepted without changing its value.

Instance member SetItemData(hItem, sText, nValue, nItemFlags)

Updates an outline item's text, numeric value, and flags.

ParameterTypeDescription
hItemSalNumberThe item handle.
sTextSalStringThe new caption.
nValueSalNumberThe new numeric value.
nItemFlagsSalNumberThe 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.

Instance member SetItemFlags(hItem, nFlags, bState)

Sets or clears selected outline item flags.

ParameterTypeDescription
hItemSalNumberThe item handle.
nFlagsSalNumberThe ITEM_ bit mask.
bStateSalBooleanTrue 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.

Instance member SetItemFont(hItem, hFont)

Changes an outline item's font.

ParameterTypeDescription
hItemSalNumberThe item handle.
hFontSalNumberThe registered font handle.

Returns: SalBoolean. True for a resolved supported item; otherwise, false.

The internal root is accepted without changing its value.

Instance member SetItemPicture(hItem, hPicNormal, hPicSelected)

Changes an outline item's pictures.

ParameterTypeDescription
hItemSalNumberThe item handle.
hPicNormalSalNumberThe normal picture handle.
hPicSelectedSalNumberThe selected picture handle.

Returns: SalBoolean. True for a resolved supported item; otherwise, false.

The internal root is accepted without changing its value.

Instance member SetItemText(hItem, sText)

Changes an outline item's caption.

ParameterTypeDescription
hItemSalNumberThe item handle.
sTextSalStringThe new caption.

Returns: SalBoolean. True for a resolved supported item; otherwise, false.

The internal root is accepted without changing its value.

Instance member SetItemValue(hItem, nValue)

Changes an outline item's numeric value.

ParameterTypeDescription
hItemSalNumberThe item handle.
nValueSalNumberThe numeric value.

Returns: SalBoolean. True for a resolved supported item; otherwise, false.

The internal root is accepted without changing its value.

Instance member SetOutlineRedraw(bRedraw)

Begins or ends a batch of outline updates.

ParameterTypeDescription
bRedrawSalBooleanFalse calls BeginUpdate; true calls EndUpdate.

Returns: SalBoolean. True for a delegated tree; otherwise, false.

Balance disabled redraw with an enabled redraw call.

Instance member SetPicture(nIndex, hPicNormal, hPicSelected)

Assigns an extended list item's two picture handles.

ParameterTypeDescription
nIndexSalNumberThe zero-based list item index.
hPicNormalSalNumberThe normal-state picture handle.
hPicSelectedSalNumberThe selected-state picture handle.

Returns: SalNumber. One if the item is found; zero otherwise.

Instance member SetStyle(nStyle)

Applies the supported Visual Toolchest style bits to the delegated control.

ParameterTypeDescription
nStyleSalNumberThe 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.

Instance member ShowOutline(nLevel)

Expands an outline to a specified level.

ParameterTypeDescription
nLevelSalNumberThe 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

NameDescription
ISalWindow