SalTreeControl
Namespace: PPJ.Runtime.Windows
Assembly: PPJ.Web.50 (5.0.0.0)
Displays hierarchical SAL tree items with editable labels, tooltips, and window actions.
- C#
- VB.NET
public class SalTreeControl : TreeView, ISalWindow, ISalControl
Public Class SalTreeControl
Inherits TreeView
Implements ISalWindow, ISalControl
Example:
using PPJ.Runtime.Windows;
var tree = new SalTreeControl();
var root = new SalTreeItem("Customers");
root.Nodes.Add(new SalTreeItem("Ada"));
tree.Nodes.Add(root);
Constructors
SalTreeControl()
Initializes a tree with label editing and node tooltips enabled.
Properties
Label
Control: Gets or sets the label associated with this control through its containing SAL form.
NamedProperties
SalNamedProperties: Gets this window's SAL named-property collection.
ShowRoot
Boolean: Gets or sets whether existing nodes are grouped under a displayed root.
Enabling creates a non-dynamic root captioned with the control Name and moves top-level nodes beneath it. Disabling promotes its children and removes the root.
Methods
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 and is not disposed; otherwise, false.
CenterWindow()
Centers this window within its parent, owner, or available screen area.
Returns: SalBoolean. True if the centering operation is accepted; false for an unavailable control, design mode, or unavailable screen bounds.
Clear()
Clears editable text or selection according to the control type.
Returns: SalBoolean. False for an unavailable control or a form; otherwise, true.
Text fields and labels are emptied; check boxes are unchecked; list selections are cleared. Other control types are left unchanged.
ClearCursor(nType)
Restores the default cursor for the requested role.
| Parameter | Type | Description |
|---|---|---|
| nType | SalNumber | The cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop. |
Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
Only the window role changes the displayed cursor. Drag/drop roles are accepted for SAL windows without changing a cursor.
CollapseItem(hItem)
Collapses a node.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
Returns: SalBoolean. True when the node exists and the operation is requested; otherwise false.
DeleteItem(hItem)
Removes a node and its subtree from the tree.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
Returns: SalBoolean. True when the node exists and the operation is requested; otherwise false.
DemoteItem(hItem)
Appends the node to its previous sibling's parent collection.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
Returns: SalBoolean. True when the node, previous sibling, and that sibling's parent exist; otherwise false.
This implementation does not make the node a child of the previous sibling.
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.
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.
EditItem(hItem)
Requests in-place editing of a node caption.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
Returns: SalBoolean. True when the node exists and the operation is requested; otherwise false.
EnableItem(hItem, bEnable)
Changes a node's enabled state.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
| bEnable | SalBoolean | The new Enabled value. |
Returns: SalBoolean. The previous enabled state, or false if the node is absent.
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.
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.
ExpandItem(hItem)
Expands a node.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
Returns: SalBoolean. True when the node exists and the operation is requested; otherwise false.
FindChild(windowName)
| Parameter | Type | Description |
|---|---|---|
| windowName | SalString |
Returns: SalWindowHandle.
Applies the referenced SAL operation to this control.
FindItemByData(hItem, nData)
Searches SalTreeItem children depth-first for an application value.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | Parent handle; zero searches the displayed root's children or the top-level collection. |
| nData | SalNumber | The application value to match. |
Returns: SalNumber. The first matching handle, or SalNumber.Null if absent.
Only SalTreeItem branches are traversed.
FindItemByTitle(hItem, sTitle)
Searches child nodes depth-first for an exact caption.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | Parent handle; zero searches the displayed root's children or the top-level collection. |
| sTitle | SalString | The exact case-sensitive caption to find. |
Returns: SalNumber. The first matching handle, or SalNumber.Null if absent.
FireWindowActions(msg, mywParam, mylParam)
Synchronously dispatches a SAL message to this control.
| Parameter | Type | Description |
|---|---|---|
| msg | SalNumber | The message identifier. |
| mywParam | SalNumber | The first message parameter. |
| mylParam | SalNumber | The second message parameter. |
Returns: SalNumber. The Return value supplied by message processing.
FormUnitsToPixels(formUnits, vertical)
| Parameter | Type | Description |
|---|---|---|
| formUnits | SalNumber | |
| vertical | SalBoolean |
Returns: SalNumber.
Applies the referenced SAL operation to this control.
GetClassName()
Gets the application class name associated with this control.
Returns: SalString. The application class name, an empty string for runtime-defined classes, or a SAL null string when the control cannot be resolved.
Forms are represented by their base type; nested table-window types are resolved to their non-nested base.
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)
| Parameter | Type | Description |
|---|---|---|
| typeMask | SalNumber |
Returns: SalWindowHandle.
Applies the referenced SAL operation to this control.
GetFirstItem(hItem)
Reads the first child handle.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The parent handle; zero uses the displayed root's children or the top-level collection. |
Returns: SalNumber. The first child handle, or zero for an empty or unresolved collection.
GetFont(name, size, enhancement)
| Parameter | Type | Description |
|---|---|---|
| name | SalString | |
| size | SalNumber | |
| enhancement | SalNumber |
Returns: SalBoolean.
Applies the referenced SAL operation to this control.
GetItemCount(hItem)
Counts a resolved node's immediate children.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
Returns: SalNumber. The child count, or zero when the node cannot be resolved, including zero without a displayed root.
GetItemData(hItem)
Reads a SalTreeItem application value.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
Returns: SalNumber. The stored Value, or SalNumber.Null if the node is absent or is not a SalTreeItem.
GetItemParent(hItem)
Reads a node's parent handle.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
Returns: SalNumber. The related handle, or zero when the node or related node is absent.
GetItemText(hItem)
Reads a node's caption.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
Returns: SalString. The text, or SalString.Null if the node is absent.
GetItemTooltip(hItem)
Reads a node's tooltip.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
Returns: SalString. The text, or SalString.Null if the node is absent.
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.
GetLocation(x, y)
Copies the translated control location in form units.
| Parameter | Type | Description |
|---|---|---|
| x | SalNumber | Receives the horizontal location. |
| y | SalNumber | Receives the vertical location. |
Returns: SalBoolean. Always true.
GetName(text)
| Parameter | Type | Description |
|---|---|---|
| text | SalString |
Returns: SalBoolean.
Applies the referenced SAL operation to this control.
GetName()
Gets this control's name.
Returns: SalString. The control name, or an empty string if the control cannot be resolved.
GetNextChild(typeMask)
| Parameter | Type | Description |
|---|---|---|
| typeMask | SalNumber |
Returns: SalWindowHandle.
Applies the referenced SAL operation to this control.
GetNextItem(hItem)
Reads a node's next sibling handle.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
Returns: SalNumber. The related handle, or zero when the node or related node is absent.
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.
GetPrevItem(hItem)
Reads a node's previous sibling handle.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
Returns: SalNumber. The related handle, or zero when the node or related node is absent.
GetProperty(name, value)
| Parameter | Type | Description |
|---|---|---|
| name | SalString | |
| value | SalString |
Returns: SalBoolean.
Applies the referenced SAL operation to this control.
GetProperty(name)
| Parameter | Type | Description |
|---|---|---|
| name | SalString |
Returns: SalString.
Applies the referenced SAL operation to this control.
GetSelectedItem()
Reads the selected node handle.
Returns: SalNumber. The handle, or zero if no node is selected.
GetSize(width, height)
Copies the translated control size in form units.
| Parameter | Type | Description |
|---|---|---|
| width | SalNumber | Receives the width. |
| height | SalNumber | Receives the height. |
Returns: SalBoolean. Always true.
GetText(text, maxLen)
| Parameter | Type | Description |
|---|---|---|
| text | SalString | |
| maxLen | SalNumber |
Returns: SalNumber.
Applies the referenced SAL operation to this control.
GetText(maxLen)
| Parameter | Type | Description |
|---|---|---|
| maxLen | SalNumber |
Returns: SalString.
Applies the referenced SAL operation to this control.
GetWindowColor(colorIndex)
| Parameter | Type | Description |
|---|---|---|
| colorIndex | SalNumber |
Returns: SalNumber.
Applies the referenced SAL operation to this control.
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.
InsertItem(hItem, nIndex, sTitle)
Inserts a new dynamic SalTreeItem.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The parent handle. Zero or an unresolved handle inserts in the top-level collection. |
| nIndex | SalNumber | The insertion position; -1 appends. |
| sTitle | SalString | The new caption. |
Returns: SalNumber. The new node handle.
A zero parent does not select the displayed root for this operation.
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)
| Parameter | Type | Description |
|---|---|---|
| typeClass | Type |
Returns: SalBoolean.
Applies the referenced SAL operation to this control.
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.
ItemHasCheckBox(hItem)
Checks whether a node has an individual checkbox.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
Returns: SalBoolean. The node state, or false if it is absent.
ItemIsChecked(hItem)
Checks whether a node is checked.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
Returns: SalBoolean. The node state, or false if it is absent.
ItemIsExpanded(hItem)
Checks whether a node is expanded.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
Returns: SalBoolean. The node state, or false if it is absent.
ItemIsSelected(hItem)
Compares a resolved node to SelectedNode.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
Returns: SalBoolean. True when both references are equal, including when neither resolves to a node.
ItemsHaveCheckBoxes()
Reads the tree-wide checkbox setting.
Returns: SalBoolean. The CheckBoxes property.
KillTimer(idEvent)
| Parameter | Type | Description |
|---|---|---|
| idEvent | SalNumber |
Returns: SalBoolean.
Applies the referenced SAL operation to this control.
MoveDownItem(hItem)
Moves a child one position down in its parent collection.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
Returns: SalBoolean. True when moved; false for an absent node, no parent, or a node already last.
MoveItem(hItem, hParentItem, nPosition)
Inserts an existing node into another parent's child collection.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
| hParentItem | SalNumber | The destination parent handle. |
| nPosition | SalNumber | The destination child position. |
Returns: SalBoolean. True when both nodes resolve and insertion completes; otherwise false.
MoveUpItem(hItem)
Moves a child one position up in its parent collection.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
Returns: SalBoolean. True when moved; false for an absent node, no parent, or a node already first.
MoveWindow(xOffset, yOffset)
Moves the translated control by an offset in form units.
| Parameter | Type | Description |
|---|---|---|
| xOffset | SalNumber | Horizontal displacement. |
| yOffset | SalNumber | Vertical displacement. |
Returns: SalBoolean. The result of SalWindow.Move.
OnAfterCollapse(e)
Sends SAM_ItemCollapsed with the node handle before raising the inherited event.
| Parameter | Type | Description |
|---|---|---|
| e | TreeViewEventArgs | The node event data. |
OnAfterExpand(e)
Sends SAM_ItemExpanded with the node handle before raising the inherited event.
| Parameter | Type | Description |
|---|---|---|
| e | TreeViewEventArgs | The node event data. |
OnAfterSelect(e)
Updates modification state, raises the inherited event, and sends SAM_ItemSelected.
| Parameter | Type | Description |
|---|---|---|
| e | TreeViewEventArgs | The selected node and selection action. |
Mouse and keyboard selections mark the control modified; Unknown clears the flag. The message carries the selected node handle.
OnBeforeLabelEdit(e)
Cancels editing unless the node is an editable SalTreeItem, then raises the inherited event.
| Parameter | Type | Description |
|---|---|---|
| e | NodeLabelEditEventArgs | The cancellable label-edit event. |
OnDoubleClick(e)
Raises the inherited event, then sends SAM_DoubleClick with client-relative cursor coordinates.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The double-click event data. |
OnNodeMouseClick(e)
Sends SAM_ItemClicked with the node handle before raising the inherited event.
| Parameter | Type | Description |
|---|---|---|
| e | TreeNodeMouseClickEventArgs | The clicked node and mouse information. |
OnWebEvent(e)
Processes the inherited browser event, then simulates WinSDK events.
| Parameter | Type | Description |
|---|---|---|
| e | WisejEventArgs | The browser event. |
OnWebRender(config)
Selects the standard or virtual SAL tree client.
| Parameter | Type | Description |
|---|---|---|
| config | Object | The mutable browser configuration. |
PixelsToFormUnits(numPixels, vertical)
| Parameter | Type | Description |
|---|---|---|
| numPixels | SalNumber | |
| vertical | SalBoolean |
Returns: SalNumber.
Applies the referenced SAL operation to this control.
PostMessage(msg, mywParam, mylParam)
| Parameter | Type | Description |
|---|---|---|
| msg | SalNumber | |
| mywParam | SalNumber | |
| mylParam | SalNumber |
Returns: SalBoolean.
Applies the referenced SAL operation to this control.
PromoteItem(hItem)
Appends the node to its existing parent's child collection.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
Returns: SalBoolean. True when the node and parent exist; otherwise false.
This implementation does not move the node to its grandparent.
Reset(bRemove)
Clears all children or removes dynamic nodes from the root collection.
| Parameter | Type | Description |
|---|---|---|
| bRemove | SalBoolean | True to clear all children; false to remove only dynamic nodes at that collection level. |
Returns: SalBoolean. Always true.
Preserves the optional displayed root. With bRemove false, non-SalTreeItem nodes count as dynamic; descendants of retained static nodes are not traversed.
SendMessage(msg, mywParam, mylParam)
| Parameter | Type | Description |
|---|---|---|
| msg | SalNumber | |
| mywParam | SalNumber | |
| mylParam | SalNumber |
Returns: SalNumber.
Applies the referenced SAL operation to this control.
SendMessageToChildren(msg, mywParam, mylParam)
| Parameter | Type | Description |
|---|---|---|
| msg | SalNumber | |
| mywParam | SalNumber | |
| mylParam | SalNumber |
Returns: SalBoolean.
Applies the referenced SAL operation to this control.
SetContextMenu(sMenuName, nFlags)
Creates and assigns a context menu for this control.
| Parameter | Type | Description |
|---|---|---|
| sMenuName | SalString | The name used to resolve the menu type. |
| nFlags | SalNumber | Use Sys.CM_TableCell to target the associated table column; other values target the control. |
Returns: SalBoolean. True if the menu was created; false if the control or menu type is unavailable or menu creation fails.
SetContextMenu(menuType, flags)
| Parameter | Type | Description |
|---|---|---|
| menuType | Type | |
| flags | SalNumber |
Returns: SalBoolean.
Applies the referenced SAL operation to this control.
SetCursor(nResourceId, nType)
Assigns a predefined cursor to the requested role.
| Parameter | Type | Description |
|---|---|---|
| nResourceId | Int32 | A supported Sys.CURSOR_* cursor identifier. |
| nType | SalNumber | The cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop. |
Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
Only the window role changes the displayed cursor. Drag/drop roles are accepted for SAL windows without changing a cursor.
SetCursor(sBlob, nType)
Requests a cursor from binary data; this web implementation does not support binary cursor loading.
| Parameter | Type | Description |
|---|---|---|
| sBlob | SalString | The binary cursor data. |
| nType | SalNumber | The cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop. |
Returns: SalBoolean. Always false.
SetCursorFile(sFile, nType)
Loads a cursor from a file and assigns it to the requested role.
| Parameter | Type | Description |
|---|---|---|
| sFile | SalString | The cursor file path. |
| nType | SalNumber | The cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop. |
Returns: SalBoolean. True if loading and assignment succeed; otherwise, false.
Only the window role changes the displayed cursor. Drag/drop roles are accepted for SAL windows without changing a cursor.
SetFocus()
Requests keyboard focus for this control.
Returns: SalWindowHandle. The previously focused control's handle, or a null SAL handle when no previous control exists or this target is ineligible.
Hidden or disabled controls and table columns are ineligible.
SetFont(name, size, enhancement)
| Parameter | Type | Description |
|---|---|---|
| name | SalString | |
| size | SalNumber | |
| enhancement | SalNumber |
Returns: SalBoolean.
Applies the referenced SAL operation to this control.
SetItemChecked(hItem, bChecked)
Sets a node's checked state.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
| bChecked | SalBoolean | The new checked state. |
Returns: SalBoolean. True when the required node exists; otherwise false.
SetItemData(hItem, nValue)
Replaces a SalTreeItem application value.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
| nValue | SalNumber | The new value. |
Returns: SalNumber. The previous value; if no SalTreeItem resolves, the implementation returns SalBoolean.Null converted to SalNumber.
SetItemEditable(hItem, bEditable)
Sets whether a SalTreeItem permits label editing.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
| bEditable | SalBoolean | The new editing permission. |
Returns: SalBoolean. True when the required node exists; otherwise false.
SetItemFontEnh(hItem, nFontEnh)
Applies font enhancements using the tree's font family and point size.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
| nFontEnh | SalNumber | The SAL font enhancement flags. |
Returns: SalBoolean. True when the required node exists; otherwise false.
SetItemImage(hItem, bSelected, sImageFile)
Assigns a node picture loaded from a server file.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
| bSelected | SalBoolean | True to change the selected-state picture; false for the normal picture. |
| sImageFile | SalString | The image filename, or empty to remove the current image-list entry. |
Returns: SalBoolean. False for an absent node or missing nonempty file; true when applied.
SetItemImageFromBinary(hItem, bSelected, nFormat, bPicture)
Assigns a node picture decoded from binary image data.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
| bSelected | SalBoolean | True to change the selected-state picture; false for the normal picture. |
| nFormat | SalNumber | The PIC_Format* code used by SalPicture.GetImageFromBlob. |
| bPicture | SalBinary | The encoded image data; absent decoded data removes the current image-list entry. |
Returns: SalBoolean. True when the node exists and decoding completes; otherwise false.
SetItemImageFromResource(hItem, bSelected, tResource)
Assigns a node picture from a SAL resource.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
| bSelected | SalBoolean | True to change the selected-state picture; false for the normal picture. |
| tResource | SalResource | The resource; null or a resource without an image removes the current image-list entry. |
Returns: SalBoolean. True when the node exists and the operation completes; otherwise false.
SetItemText(hItem, sText)
Changes a node caption.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
| sText | SalString | The new caption. |
Returns: SalBoolean. True when the required node exists; otherwise false.
SetItemTextColor(hItem, nColor)
Changes a node's foreground color.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
| nColor | SalNumber | The SAL color to apply. |
Returns: SalBoolean. True when the required node exists; otherwise false.
SetItemTooltip(hItem, sTooltip)
Changes a node tooltip.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
| sTooltip | SalString | The new tooltip. |
Returns: SalBoolean. True when the required node exists; otherwise false.
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.
SetLocation(x, y)
Sets the translated control location in form units.
| Parameter | Type | Description |
|---|---|---|
| x | SalNumber | Horizontal coordinate. |
| y | SalNumber | Vertical coordinate. |
Returns: SalBoolean. The result of SalWindow.SetLocation.
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.
SetProperty(name, value, length)
Stores a named string property after limiting its length.
| Parameter | Type | Description |
|---|---|---|
| name | SalString | The case-sensitive property name. |
| value | SalString | The source string. |
| length | SalNumber | The maximum prefix length passed to SalString.Left. |
Returns: SalBoolean. The result of the named-property assignment.
SetSelectedItem(hItem)
Selects a node.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
Returns: SalBoolean. True when the node exists and the operation is requested; otherwise false.
SetSize(width, height)
Sets the translated control size in form units.
| Parameter | Type | Description |
|---|---|---|
| width | SalNumber | Requested width. |
| height | SalNumber | Requested height. |
Returns: SalBoolean. The result of SalWindow.SetSize.
SetText(text)
| Parameter | Type | Description |
|---|---|---|
| text | SalString |
Returns: SalBoolean.
Applies the referenced SAL operation to this control.
SetTimer(idEvent, elapseMilliSec)
| Parameter | Type | Description |
|---|---|---|
| idEvent | SalNumber | |
| elapseMilliSec | SalNumber |
Returns: SalBoolean.
Applies the referenced SAL operation to this control.
SetWindowColor(colorIndex, color)
| Parameter | Type | Description |
|---|---|---|
| colorIndex | SalNumber | |
| color | SalNumber |
Returns: SalBoolean.
Applies the referenced SAL operation to this control.
ShowItemCheckBox(hItem, bShow)
Changes a node's individual checkbox visibility.
| Parameter | Type | Description |
|---|---|---|
| hItem | SalNumber | The node handle; zero resolves to the optional displayed root. |
| bShow | SalBoolean | Whether to show the checkbox. |
Returns: SalBoolean. True when the required node exists; otherwise false.
ShowItemsCheckBoxes(bShow)
Changes the tree-wide checkbox setting.
| Parameter | Type | Description |
|---|---|---|
| bShow | SalBoolean | The new CheckBoxes value. |
Returns: SalBoolean. Always true.
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)
Displays a popup menu for this control.
| Parameter | Type | Description |
|---|---|---|
| menuName | SalString | The popup menu class name. |
| flags | SalNumber | Popup positioning flags. |
| x | SalNumber | Horizontal coordinate in pixels. |
| y | SalNumber | Vertical coordinate in pixels. |
Returns: SalBoolean. The result of SalWindow.TrackPopupMenu.
TrackPopupMenu(menuType, flags, x, y)
Displays a popup menu for this control.
| Parameter | Type | Description |
|---|---|---|
| menuType | Type | The popup menu type. |
| flags | SalNumber | Popup positioning flags. |
| x | SalNumber | Horizontal coordinate in pixels. |
| y | SalNumber | Vertical coordinate in pixels. |
Returns: SalBoolean. The result of SalWindow.TrackPopupMenu.
UpdateWindow()
Requests an update of this control.
Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
Events
WindowActions
WindowActionsEventHandler Occurs when the control receives a SAL or application-defined window action.
Implements
| Name | Description |
|---|---|
| ISalControl | Exposes a SAL control's data type, value, and modification state. |
| ISalWindow | Provides SAL window actions, named properties, and access to a window's runtime implementation. |