Skip to main content
Version: 2025

VisListView

Namespace: PPJ.Runtime.Vis

Assembly: PPJ.Web.Vis.50 (5.0.0.0)

A list view exposing Visual Toolchest item, column, image, selection, and sorting operations.

public class VisListView : ListView, ISalWindow

Items and columns use zero-based indices. Item application values are stored as Int32 values in Tag.

Example:

var list = new VisListView();
list.ViewDetails();
list.InsertItemValue(0, "Ready", 10, -1);
SalNumber value = list.GetItemValue(0);

Constructors

Instance member VisListView()

Initializes SAL window handling, a column-zero sorter with no ordering, and the control.

Properties

Instance member NamedProperties

SalNamedProperties: Gets this window's SAL named-property collection.

Methods

Instance member AddImage(hpicLarge, hpicSmall)

Adds a pair of pictures to the large and small image lists.

ParameterTypeDescription
hpicLargeSalNumberA valid nonzero large-picture handle.
hpicSmallSalNumberA valid nonzero small-picture handle.

Returns: SalNumber. The new large-image index, or -1 if either picture is missing or null.

Creates default image lists if necessary. The paired lists are expected to use matching indices.

Instance member AssignColumns(saTitles, naAlignments, naWidths, nNumColumns)

Replaces all columns from parallel arrays.

ParameterTypeDescription
saTitlesSalArray<SalString>Column titles beginning at index zero.
naAlignmentsSalArray<SalNumber>HorizontalAlignment numeric values beginning at index zero.
naWidthsSalArray<SalNumber>Column widths in horizontal form units beginning at index zero.
nNumColumnsSalNumberThe number of entries to read from each array.

Returns: SalBoolean. True when all columns have been added.

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

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

Instance member ClearCursor(nType)

Restores the default cursor for the requested role.

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

Instance member DeleteAllItems()

Clears all items.

Returns: SalBoolean. Always true.

Instance member DeleteItem(nItem)

Removes an item at the specified index.

ParameterTypeDescription
nItemSalNumberThe zero-based item index.

Returns: SalNumber. The remaining item count.

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

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

Protected member Dispose(disposing)

Marks this SAL window disposed before releasing the base control resources.

ParameterTypeDescription
disposingBooleanTrue to release managed resources; false for finalization cleanup.

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

Instance member EnsureVisible(nItem, fPartialOK)

Scrolls an item into view.

ParameterTypeDescription
nItemSalNumberThe zero-based item index.
fPartialOKSalBooleanRetained for compatibility; ignored.

Returns: SalBoolean. True if the inherited EnsureVisible operation completes.

Instance member FindChild(sWindowName)

Searches this window for a child control by name.

ParameterTypeDescription
sWindowNameSalStringThe child control name to locate.

Returns: SalWindowHandle. The matching child handle, or a null SAL handle if no child is found.

Instance member FindItem(nFlags, sItemText, nItemStart)

Searches for an item after a specified starting index.

ParameterTypeDescription
nFlagsSalNumberLVFI_String enables text search; LVFI_Partial allows a prefix and LVFI_Wrap requests a wrapped search.
sItemTextSalStringThe text to search for.
nItemStartSalNumberThe item preceding the search, or -1 to start at the beginning.

Returns: SalNumber. The matching index, or -1 for an invalid start or no match.

Only the item caption is searched. Without LVFI_String, this implementation calls GetNextItem with LVNI_All as its first argument and nItemStart as its flags argument.

Instance member FormUnitsToPixels(nFormUnits, bVertical)

Converts a length in form units to pixels using this control's form metrics.

ParameterTypeDescription
nFormUnitsSalNumberThe length in form units.
bVerticalSalBooleanTrue for a vertical measurement; false for a horizontal measurement.

Returns: SalNumber. The converted pixel length.

Static member FromHandle(hWnd)

Resolves a SAL handle to an existing VisListView.

ParameterTypeDescription
hWndSalWindowHandleThe control handle to resolve.

Returns: VisListView. The associated control, or when no control is resolved.

Throws:

Instance member GetAllSelectedItems(naSelections)

Replaces an array with the indices of all selected items.

ParameterTypeDescription
naSelectionsSalArray<SalNumber>The output array; reset and made dynamic before filling from index zero.

Returns: SalNumber. The resulting array length.

Instance member GetBkColor()

Reads the list-view background color.

Returns: SalNumber. The Win32 color value.

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

Instance member GetColumn(nColumn, sTitle, nAlignment, nWidth)

Reads a column's caption, alignment, and width.

ParameterTypeDescription
nColumnSalNumberThe zero-based column index.
sTitle by referenceSalStringReceives the caption.
nAlignment by referenceSalNumberReceives the HorizontalAlignment numeric value.
nWidth by referenceSalNumberReceives the width in horizontal form units.

Returns: SalBoolean. True for an existing column; otherwise false and the outputs are unchanged.

Instance member GetColumnAlignment(nColumn)

Reads a column's text alignment.

ParameterTypeDescription
nColumnSalNumberThe zero-based column index.

Returns: SalNumber. The HorizontalAlignment numeric value, or zero if the column is absent.

Instance member GetColumnTitle(nColumn)

Reads a column's caption.

ParameterTypeDescription
nColumnSalNumberThe zero-based column index.

Returns: SalString. The caption, or an empty string if the column is absent.

Instance member GetColumnWidth(nColumn)

Reads a column's width.

ParameterTypeDescription
nColumnSalNumberThe zero-based column index.

Returns: SalNumber. The width in horizontal form units, or zero if the column is absent.

Instance member GetControlType()

Gets the SAL window type of this control.

Returns: SalNumber. The SAL Sys.TYPE_* code for the translated control.

Instance member GetFirstChild(nTypeMask)

Finds the first child matching a SAL window-type mask.

ParameterTypeDescription
nTypeMaskSalNumberThe SAL window types to include; zero matches no controls.

Returns: SalWindowHandle. The first matching child handle, or a null SAL handle when none matches.

Ordinary controls use tab order; table columns use their creation order, and MDI forms use their child-form collection.

Instance member GetFocusItem()

Reads the item with keyboard focus.

Returns: SalNumber. Its index, or -1 if no item is focused.

Instance member GetFont(sName, nSize, nEnhancement)

Reads the control font's family, point size, and style flags.

ParameterTypeDescription
sName by referenceSalStringReceives the font family name.
nSize by referenceSalNumberReceives the size in points.
nEnhancement by referenceSalNumberReceives the combined Sys.FONT_Enh* style flags.

Returns: SalBoolean. True if a font was available; otherwise, false.

Instance member GetImageCount()

Counts images in the small-image list.

Returns: SalNumber. The count, or zero if no small-image list exists.

Instance member GetItem(nItem, nSubItem, sItemText, nItemValue, nImage)

Reads a caption and the main item's value and image index.

ParameterTypeDescription
nItemSalNumberThe zero-based item index.
nSubItemSalNumberZero or a negative value for the main item; a positive subitem index otherwise.
sItemText by referenceSalStringReceives the caption.
nItemValue by referenceSalNumberReceives the main item's Int32 Tag or zero; subitems return zero.
nImage by referenceSalNumberReceives the main image index; subitems return zero.

Returns: SalBoolean. True for an existing item or subitem; otherwise false with outputs unchanged.

Instance member GetItemCount()

Counts the items in the collection.

Returns: SalNumber. The item count.

Instance member GetItemState(nItem, nMask)

Reads masked focus, selection, and state-image flags.

ParameterTypeDescription
nItemSalNumberThe zero-based item index.
nMaskSalNumberThe LVIS_* bits to retain.

Returns: SalNumber. The masked state, or zero if the item is absent.

Instance member GetItemText(nItem, nSubItem)

Reads an item or subitem caption.

ParameterTypeDescription
nItemSalNumberThe zero-based item index.
nSubItemSalNumberZero or negative for the main item; positive for a subitem.

Returns: SalString. The caption, or an empty string if the item is absent.

Instance member GetItemValue(nItem)

Reads the Int32 application value stored in Tag.

ParameterTypeDescription
nItemSalNumberThe zero-based item index.

Returns: SalNumber. The stored value, or zero for a missing item or null Tag.

Instance member GetLocation(nX, nY)

Reads this control's location in form units.

ParameterTypeDescription
nX by referenceSalNumberReceives the horizontal location.
nY by referenceSalNumberReceives the vertical location.

Returns: SalBoolean. Always true; an unresolved control produces zero coordinates.

Instance member GetName(sText)

Copies this control's name to the supplied variable.

ParameterTypeDescription
sText by referenceSalStringReceives the control name when the operation succeeds.

Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Instance member GetName()

Gets this control's name.

Returns: SalString. The control name, or an empty string if the control cannot be resolved.

Instance member GetNextChild(nTypeMask)

Finds the next sibling matching a SAL window-type mask.

ParameterTypeDescription
nTypeMaskSalNumberThe SAL window types to include; zero matches no controls.

Returns: SalWindowHandle. The next matching control handle, or a null SAL handle when none matches.

Instance member GetNextItem(nItem, nFlags)

Finds the next item in the complete or selected-item sequence.

ParameterTypeDescription
nItemSalNumberThe preceding item index, or -1 to begin.
nFlagsSalNumberLVNI_All or LVNI_Selected; other values throw NotSupportedException.

Returns: SalNumber. The next index, or -1 when no next item exists or the starting item is invalid.

For selected-item enumeration, an existing unselected starting item begins at the first selected item.

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

Instance member GetProperty(sName, sValue)

Reads a SAL named property into a supplied variable.

ParameterTypeDescription
sNameSalStringThe property name.
sValue by referenceSalStringReceives the value only when the property is found.

Returns: SalBoolean. True if a non-null property value was found; otherwise, false.

Instance member GetProperty(sName)

Gets the value of a SAL named property.

ParameterTypeDescription
sNameSalStringThe property name.

Returns: SalString. The property value, or a SAL null string if the value is unavailable.

Instance member GetSelectedCount()

Counts selected items.

Returns: SalNumber. The selected-item count.

Instance member GetSelectedItem()

Reads the first selected item.

Returns: SalNumber. Its zero-based index, or -1 if there is no selection.

Instance member GetSize(nWidth, nHeight)

Reads this control's size in form units.

ParameterTypeDescription
nWidth by referenceSalNumberReceives the width.
nHeight by referenceSalNumberReceives the height.

Returns: SalBoolean. Always true; an unresolved control produces a zero size.

Instance member GetSortColumn()

Reads the configured sort column.

Returns: SalNumber. The zero-based column index.

Instance member GetSortOrder()

Reads the compatibility sort order.

Returns: SalNumber. LVSORT_Descending for descending order; otherwise LVSORT_Ascending, including when sorting is disabled.

Instance member GetText(sText, nMaxLen)

Copies this control's displayed text or long-string value to a SAL string.

ParameterTypeDescription
sText by referenceSalStringReceives the retrieved text.
nMaxLenSalNumberThe maximum character count for ordinary text; ignored for a Sys.DT_LongString value.

Returns: SalNumber. The number of characters copied, or zero when no text is available.

Instance member GetText(nMaxLen)

Gets this control's displayed text or long-string value.

ParameterTypeDescription
nMaxLenSalNumberThe maximum character count for ordinary text; ignored for a Sys.DT_LongString value.

Returns: SalString. The retrieved text, or an empty string if the control cannot be resolved.

Instance member GetTextBkColor()

Reads the list-view background color.

Returns: SalNumber. The Win32 color value.

Instance member GetTextColor()

Reads the list-view foreground color.

Returns: SalNumber. The Win32 color value.

Instance member GetWindowColor(nColorIndex)

Reads a window or cell color as a Win32 color value.

ParameterTypeDescription
nColorIndexSalNumberThe Sys.COLOR_Index* color component to read.

Returns: SalNumber. The color encoded as a Win32 color value, or zero if the control is unavailable.

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

Instance member HideWindow()

Hides this control or table column.

Returns: SalBoolean. The visibility state before the operation, or false if the control cannot be resolved.

Instance member InsertDetails(nItem, saText, nImage)

Inserts a row of item and subitem captions.

ParameterTypeDescription
nItemSalNumberInsertion index, clamped to zero through the current item count.
saTextSalArray<SalString>Zero-based captions; element zero is the item caption and later elements are subitems.
nImageSalNumberThe index in the image lists, or -1 for no picture.

Returns: SalNumber. The inserted index.

Instance member InsertDetailsPic(nItem, saText, hpicLarge, hpicSmall)

Inserts a row of item and subitem captions and a newly added image pair.

ParameterTypeDescription
nItemSalNumberInsertion index, clamped to zero through the current item count.
saTextSalArray<SalString>Zero-based captions; element zero is the item caption and later elements are subitems.
hpicLargeSalNumberA valid large-picture handle.
hpicSmallSalNumberA valid small-picture handle.

Returns: SalNumber. The inserted index, or -1 if the picture pair cannot be added.

Instance member InsertDetailsValue(nItem, saText, nItemValue, nImage)

Inserts a row of item and subitem captions with an application value.

ParameterTypeDescription
nItemSalNumberInsertion index, clamped to zero through the current item count.
saTextSalArray<SalString>Zero-based captions; element zero is the item caption and later elements are subitems.
nItemValueSalNumberThe application value, converted to Int32 and stored in Tag.
nImageSalNumberThe index in the image lists, or -1 for no picture.

Returns: SalNumber. The inserted index.

Instance member InsertDetailsValuePic(nItem, saText, nItemValue, hpicLarge, hpicSmall)

Inserts a row of item and subitem captions with an application value and a newly added image pair.

ParameterTypeDescription
nItemSalNumberInsertion index, clamped to zero through the current item count.
saTextSalArray<SalString>Zero-based captions; element zero is the item caption and later elements are subitems.
nItemValueSalNumberThe application value, converted to Int32 and stored in Tag.
hpicLargeSalNumberA valid large-picture handle.
hpicSmallSalNumberA valid small-picture handle.

Returns: SalNumber. The inserted index, or -1 if the picture pair cannot be added.

Instance member InsertItem(nItem, sText, nImage)

Inserts an item.

ParameterTypeDescription
nItemSalNumberInsertion index, clamped to zero through the current item count.
sTextSalStringThe item caption.
nImageSalNumberThe index in the image lists, or -1 for no picture.

Returns: SalNumber. The inserted index.

Instance member InsertItemPic(nItem, sText, hpicLarge, hpicSmall)

Inserts an item and a newly added image pair.

ParameterTypeDescription
nItemSalNumberInsertion index, clamped to zero through the current item count.
sTextSalStringThe item caption.
hpicLargeSalNumberA valid large-picture handle.
hpicSmallSalNumberA valid small-picture handle.

Returns: SalNumber. The inserted index, or -1 if the picture pair cannot be added.

Instance member InsertItemValue(nItem, sText, nItemValue, nImage)

Inserts an item with an application value.

ParameterTypeDescription
nItemSalNumberInsertion index, clamped to zero through the current item count.
sTextSalStringThe item caption.
nItemValueSalNumberThe application value, converted to Int32 and stored in Tag.
nImageSalNumberThe index in the image lists, or -1 for no picture.

Returns: SalNumber. The inserted index.

Instance member InsertItemValuePic(nItem, sText, nItemValue, hpicLarge, hpicSmall)

Inserts an item with an application value and a newly added image pair.

ParameterTypeDescription
nItemSalNumberInsertion index, clamped to zero through the current item count.
sTextSalStringThe item caption.
nItemValueSalNumberThe application value, converted to Int32 and stored in Tag.
hpicLargeSalNumberA valid large-picture handle.
hpicSmallSalNumberA valid small-picture handle.

Returns: SalNumber. The inserted index, or -1 if the picture pair cannot be added.

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

Instance member IsDerivedFromClass(tClass)

Tests this control's runtime type against an application base type.

ParameterTypeDescription
tClassTypeThe type to test, including the framework's emulated inheritance relationships.

Returns: SalBoolean. True if the runtime type derives from the requested type; otherwise, false.

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

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

Instance member KillTimer(nIDEvent)

Stops an existing timer owned by this control.

ParameterTypeDescription
nIDEventSalNumberThe identifier used when the timer was started.

Returns: SalBoolean. True if the timer was found and stopped; otherwise, false.

The timer remains registered and can be restarted by SetTimer.

Instance member MoveWindow(nXOffset, nYOffset)

Moves this control by an offset expressed in form units.

ParameterTypeDescription
nXOffsetSalNumberThe horizontal offset to add to the current position.
nYOffsetSalNumberThe vertical offset to add to the current position.

Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Protected member OnColumnClick(e)

Toggles sort order, selects the clicked column, and sorts before raising the inherited event.

ParameterTypeDescription
eColumnClickEventArgsThe event identifying the clicked column.

Protected member OnDragDrop(e)

Processes the SAL drop notification before raising the inherited event.

ParameterTypeDescription
eDragEventArgsThe event data passed to both handlers.

Protected member OnDragEnd(e)

Ends SAL drag handling before raising the inherited drag-end event.

ParameterTypeDescription
eEventArgsThe event data passed to both handlers.

Protected member OnDragEnter(e)

Processes the SAL drag-enter notification before raising the inherited event.

ParameterTypeDescription
eDragEventArgsThe event data passed to both handlers.

Protected member OnDragLeave(e)

Processes the SAL drag-leave notification before raising the inherited event.

ParameterTypeDescription
eEventArgsThe event data passed to both handlers.

Protected member OnDragOver(e)

Processes SAL drag feedback before raising the inherited drag-over event.

ParameterTypeDescription
eDragEventArgsThe event data passed to both handlers.

Protected member OnDragStart(e)

Starts SAL drag handling before raising the inherited drag-start event.

ParameterTypeDescription
eEventArgsThe event data passed to both handlers.

Protected member OnGotFocus(e)

Dispatches SAL focus-gained processing before raising the inherited focus event.

ParameterTypeDescription
eEventArgsThe focus event data.

Protected member OnHandleCreated(e)

Ensures default image lists exist before raising the inherited event.

ParameterTypeDescription
eEventArgsThe event data.

Protected member OnItemClick(e)

Sends VTM_RightClick for a right click or SAM_Click for other buttons, then raises the inherited event.

ParameterTypeDescription
eItemClickEventArgsThe clicked item and mouse button; its item index is the message parameter.

Protected member OnItemDoubleClick(e)

Sends VTM_RightDoubleClick for a right double-click or SAM_DoubleClick for other buttons.

ParameterTypeDescription
eItemClickEventArgsThe clicked item and mouse button.

Raises the inherited event after sending the SAL message.

Protected member OnItemSelectionChanged(e)

Sends SAM_Click when an item becomes selected, then raises the inherited event.

ParameterTypeDescription
eItemSelectionChangedEventArgsThe item and its new selection state.

Protected member OnLostFocus(e)

Dispatches SAL focus-lost processing before raising the inherited focus event.

ParameterTypeDescription
eEventArgsThe focus event data.

Protected member OnWebEvent(e)

Processes the browser event in a root SAL context, then dispatches its simulated WinSDK event.

ParameterTypeDescription
eWisejEventArgsThe browser event to process.

Instance member PixelsToFormUnits(nNumPixels, bVertical)

Converts a pixel length to form units using this control's form metrics.

ParameterTypeDescription
nNumPixelsSalNumberThe pixel length to convert.
bVerticalSalBooleanTrue for a vertical measurement; false for a horizontal measurement.

Returns: SalNumber. The converted length in form units.

Instance member PostMessage(nMsg, nMywParam, nMylParam)

Queues a SAL window action for later dispatch on the application context.

ParameterTypeDescription
nMsgSalNumberThe SAL or application-defined message code.
nMywParamSalNumberThe first message parameter.
nMylParamSalNumberThe second message parameter.

Returns: SalBoolean. True if the action was queued; false if the control is unavailable or disposed.

Instance member RemoveAllImages()

Clears both image lists, creating the lists if necessary.

Returns: SalBoolean. Always true.

Instance member RemoveImage(nIndex)

Removes an image at the same index in both image lists.

ParameterTypeDescription
nIndexSalNumberThe zero-based image index.

Returns: SalBoolean. True if both removals succeed; false on ArgumentOutOfRangeException.

The large-image removal is not rolled back if the small-image removal fails.

Instance member ReplaceImage(nIndex, hpicLarge, hpicSmall)

Reports that picture replacement is unavailable in this Web implementation.

ParameterTypeDescription
nIndexSalNumberThe requested image index; unused.
hpicLargeSalNumberThe requested large-picture handle; unused.
hpicSmallSalNumberThe requested small-picture handle; unused.

Returns: SalBoolean. Always false.

Ensures the image lists exist but does not extract or replace either picture.

Instance member SendMessage(nMsg, nMywParam, nMylParam)

Dispatches a SAL window action synchronously and returns its result.

ParameterTypeDescription
nMsgSalNumberThe SAL or application-defined message code.
nMywParamSalNumberThe first message parameter.
nMylParamSalNumberThe second message parameter.

Returns: SalNumber. The action's return value, or zero if the target is unavailable or disposed.

Instance member SendMessageToChildren(nMsg, nMywParam, nMylParam)

Dispatches a SAL message to this control's children.

ParameterTypeDescription
nMsgSalNumberThe SAL or application-defined message code.
nMywParamSalNumberThe first message parameter.
nMylParamSalNumberThe second message parameter.

Returns: SalBoolean. The result of child-message dispatch; false if the parent is unavailable or disposed.

Instance member SetBkColor(nNewColor)

Sets the list-view background color.

ParameterTypeDescription
nNewColorSalNumberThe SAL color to apply.

Returns: SalBoolean. Always true.

Instance member SetColumn(nColumn, nMask, sTitle, nAlignment, nWidth)

Updates the column attributes selected by a mask.

ParameterTypeDescription
nColumnSalNumberThe zero-based column index.
nMaskSalNumberLVCF_Text, LVCF_Fmt, and LVCF_Width flags selecting the supplied values.
sTitleSalStringThe new caption.
nAlignmentSalNumberThe HorizontalAlignment numeric value.
nWidthSalNumberThe new width in horizontal form units.

Returns: SalBoolean. True when the column exists; otherwise false.

Instance member SetColumnAlignment(nColumn, nAlignment)

Sets a column's text alignment.

ParameterTypeDescription
nColumnSalNumberThe zero-based column index.
nAlignmentSalNumberThe HorizontalAlignment numeric value.

Returns: SalBoolean. True if the column exists and is updated; otherwise false.

Instance member SetColumnTitle(nColumn, sTitle)

Sets a column's caption.

ParameterTypeDescription
nColumnSalNumberThe zero-based column index.
sTitleSalStringThe new caption.

Returns: SalBoolean. True if the column exists and is updated; otherwise false.

Instance member SetColumnWidth(nColumn, nWidth)

Sets a column's width.

ParameterTypeDescription
nColumnSalNumberThe zero-based column index.
nWidthSalNumberThe new width in horizontal form units.

Returns: SalBoolean. True if the column exists and is updated; otherwise false.

Instance member SetContextMenu(sMenuName, nFlags)

Creates and assigns a context menu for this control.

ParameterTypeDescription
sMenuNameSalStringThe name used to resolve the menu type.
nFlagsSalNumberUse 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.

Instance member SetContextMenu(menuType, nFlags)

Creates and assigns a context menu for this control.

ParameterTypeDescription
menuTypeTypeThe type of the menu to create.
nFlagsSalNumberUse 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.

Instance member SetCursor(nResourceId, nType)

Assigns a predefined cursor to the requested role.

ParameterTypeDescription
nResourceIdInt32A supported Sys.CURSOR_* cursor identifier.
nTypeSalNumberThe 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.

Instance member SetCursor(sBlob, nType)

Requests a cursor from binary data; this web implementation does not support binary cursor loading.

ParameterTypeDescription
sBlobSalStringThe binary cursor data.
nTypeSalNumberThe cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop.

Returns: SalBoolean. Always false.

Instance member SetCursorFile(sFile, nType)

Loads a cursor from a file and assigns it to the requested role.

ParameterTypeDescription
sFileSalStringThe cursor file path.
nTypeSalNumberThe 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.

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

Instance member SetFocusItem(nItem)

Gives keyboard focus to an item.

ParameterTypeDescription
nItemSalNumberThe zero-based item index.

Returns: SalBoolean. True if the item exists; otherwise false.

Instance member SetFont(sName, nSize, nEnhancement)

Creates and assigns a font to this control.

ParameterTypeDescription
sNameSalStringThe font family name.
nSizeSalNumberThe font size in points.
nEnhancementSalNumberThe combined Sys.FONT_Enh* style flags.

Returns: SalBoolean. True if the font was created and assigned; otherwise, false.

Instance member SetItem(nItem, nSubItem, nMask, sItemText, nItemValue, nImage)

Updates selected item attributes.

ParameterTypeDescription
nItemSalNumberThe zero-based item index.
nSubItemSalNumberZero or negative for the main item; positive for a subitem.
nMaskSalNumberLVIF_Text, LVIF_Image, and LVIF_Param flags selecting attributes to update.
sItemTextSalStringThe new caption.
nItemValueSalNumberThe new application value, converted to Int32.
nImageSalNumberThe new image-list index.

Returns: SalBoolean. True if the item or subitem exists; otherwise false.

Subitems support only text changes.

Instance member SetItemState(nItem, nNewState, nStateMask)

Changes the focus, selection, or state-image bits selected by a mask.

ParameterTypeDescription
nItemSalNumberThe zero-based item index.
nNewStateSalNumberThe new LVIS_* state values.
nStateMaskSalNumberThe LVIS_* bits to modify.

Returns: SalBoolean. True if the item exists; otherwise false.

Instance member SetItemText(nItem, nSubItem, sItemText)

Changes an item or subitem caption.

ParameterTypeDescription
nItemSalNumberThe zero-based item index.
nSubItemSalNumberZero or negative for the main item; positive for a subitem.
sItemTextSalStringThe new caption.

Returns: SalBoolean. True if the item or subitem exists; otherwise false.

Instance member SetItemValue(nItem, nItemValue)

Stores an application value in an item's Tag.

ParameterTypeDescription
nItemSalNumberThe zero-based item index.
nItemValueSalNumberThe value converted to Int32.

Returns: SalBoolean. True if the item exists; otherwise false.

Instance member SetLocation(nX, nY)

Sets this control's location in form units.

ParameterTypeDescription
nXSalNumberThe new horizontal coordinate.
nYSalNumberThe new vertical coordinate.

Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

For forms, this also selects manual startup positioning.

Instance member SetProperty(sName, sValue, nLength)

Assigns a SAL named property after limiting the value's length.

ParameterTypeDescription
sNameSalStringThe property name.
sValueSalStringThe value to assign.
nLengthSalNumberThe number of leading characters to retain.

Returns: SalBoolean. True if the translated control implements the SAL window contract; otherwise, false.

Instance member SetSize(nWidth, nHeight)

Sets this control's dimensions in form units.

ParameterTypeDescription
nWidthSalNumberThe new width.
nHeightSalNumberThe new height.

Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Instance member SetSortColumn(nColumn)

Selects the column for the next explicit sort.

ParameterTypeDescription
nColumnSalNumberThe zero-based column index.

Returns: SalBoolean. Always true.

Instance member SetSortOrder(nOrder)

Selects the ordering for the next explicit sort.

ParameterTypeDescription
nOrderSalNumberLVSORT_Ascending or LVSORT_Descending; other values disable ordering.

Returns: SalBoolean. Always true.

Instance member SetStyle(nStyle, fOn)

Applies supported Visual Toolchest list-view style flags.

ParameterTypeDescription
nStyleSalNumberView, selection, label wrapping/editing, scrolling, and column-header style flags.
fOnSalBooleanWhether to enable the specified styles.

Returns: SalNumber. Always zero; the previous style is not calculated.

LVS_ShowSelAlways, LVS_AlignLeft, and LVS_AutoArrange are unsupported. A zero view mask does not change the view.

Instance member SetText(sText)

Assigns the control's text.

ParameterTypeDescription
sTextSalStringThe text to display.

Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Instance member SetTextBkColor(nNewColor)

Sets the list-view background color.

ParameterTypeDescription
nNewColorSalNumberThe SAL color to apply.

Returns: SalBoolean. Always true.

Instance member SetTextColor(nNewColor)

Sets the list-view foreground color.

ParameterTypeDescription
nNewColorSalNumberThe SAL color to apply.

Returns: SalBoolean. Always true.

Instance member SetTimer(nIDEvent, nElapseMilliSec)

Starts or restarts a timer that sends SAL timer actions to this control.

ParameterTypeDescription
nIDEventSalNumberThe timer identifier sent in the first parameter of each Sys.SAM_Timer action.
nElapseMilliSecSalNumberThe interval between ticks, in milliseconds.

Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Instance member SetWindowColor(nColorIndex, nColor)

Assigns a window or table-cell color.

ParameterTypeDescription
nColorIndexSalNumberThe Sys.COLOR_Index* component to change.
nColorSalNumberThe SAL color value to translate and assign.

Returns: SalBoolean. True for a supported color index and resolved control; otherwise, false.

Cell colors apply only to table columns. Window colors on table windows also update their grid styles.

Instance member ShowWindow()

Shows this control or table column.

Returns: SalBoolean. The visibility state before the operation, or false if the control cannot be resolved.

Instance member SortItems()

Sorts the items once using the configured column and order.

Returns: SalBoolean. Always true.

Detaches the sorter after the operation so subsequent inserts are not automatically sorted.

Instance member TrackPopupMenu(sMenuName, nFlags, nX, nY, callback)

Creates and displays a popup menu, disposing it after it closes.

ParameterTypeDescription
sMenuNameSalStringThe name used to resolve the menu type.
nFlagsSalNumberPopup flags controlling right alignment and use of the current cursor coordinates. Center alignment and context-menu flags are not supported.
nXSalNumberThe horizontal screen coordinate in pixels, unless the cursor-X flag is set.
nYSalNumberThe vertical screen coordinate in pixels, unless the cursor-Y flag is set.
callback optionalAction<ContextMenu>An optional callback invoked when the menu closes, before it is disposed.

Returns: SalBoolean. True if the menu was created and shown; otherwise, false.

Instance member TrackPopupMenu(menuType, nFlags, nX, nY, callback)

Creates and displays a popup menu, disposing it after it closes.

ParameterTypeDescription
menuTypeTypeThe menu type to instantiate.
nFlagsSalNumberPopup flags controlling right alignment and use of the current cursor coordinates. Center alignment and context-menu flags are not supported.
nXSalNumberThe horizontal screen coordinate in pixels, unless the cursor-X flag is set.
nYSalNumberThe vertical screen coordinate in pixels, unless the cursor-Y flag is set.
callback optionalAction<ContextMenu>An optional callback invoked when the menu closes, before it is disposed.

Returns: SalBoolean. True if the menu was created and shown; otherwise, false.

Instance member UpdateWindow()

Requests an update of this control.

Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.

Instance member ViewDetails()

Switches the list view to details.

Returns: SalNumber. Always zero.

Instance member ViewLargeIcons()

Switches the list view to large icons.

Returns: SalNumber. Always zero.

Instance member ViewSmallIcons()

Switches the list view to small icons.

Returns: SalNumber. Always zero.

Events

Instance member WindowActions

WindowActionsEventHandler Occurs when the control receives a SAL or application-defined window action.

Implements

NameDescription
ISalWindow