Skip to main content

SalTableColumn

Namespace: PPJ.Runtime.Windows

Assembly: PPJ.Runtime.50 (5.0.0.0)

Defines a SAL table column and the editing, formatting, and list behavior of its current cell.

public class SalTableColumn : Control, ISalWindow, ISalEditControl, ISalControl, ISalListControl, IConvertible, IComparer

Example:

var column = new PPJ.Runtime.Windows.SalTableColumn();
column.Name = "CustomerName";
column.MaxLength = 80;

Constructors

Instance member SalTableColumn()

Initializes an editable, visible, sortable column with width 80 and maximum text length 100.

Properties

Instance member AllowDrop

Boolean: Gets the unsupported drag-and-drop setting. (Default: False)

Instance member AllowFiltering

Boolean: Gets or sets whether the grid offers filtering for this column. (Default: False)

Instance member Anchor

AnchorStyles: Gets the fixed anchoring behavior of a table column. (Default: Top, Left)

Instance member BackColor

Color: Gets or sets the column background color.

Instance member BackgroundImage

Image: Gets the unsupported background-image setting. (Default: null)

Instance member BackgroundImageLayout

ImageLayout: Gets the unsupported background-image layout setting. (Default: Tile)

Instance member CausesValidation

Boolean: Gets the fixed validation setting for a table column.

Instance member CellTextColor

Color: Gets or sets the text color of the context cell.

Instance member CellType

CellType: Gets or sets the editor used for the column cells. (Default: Standard)

Instance member CharacterCasing

CharacterCasing: Gets or sets automatic case conversion for input. (Default: Normal)

Instance member CheckBox

CellCheckBox: Gets the checked and unchecked value mapping for check-box cells.

Instance member ComboBox

CellComboBox: Gets the list and editor settings for combo-box cells.

Instance member CultureInfo

CultureInfo: Gets or sets the culture used by this column. (Default: null)

Throws:

  • ArgumentException A neutral culture is assigned and is not handled by the reset branch.

Instance member Cursor

Cursor: Gets the current cursor.

Instance member CustomEditor

Control: Gets or sets the custom control used to edit cells. (Default: null)

Instance member DataType

DataType: Gets or sets the value type used by the column cells. (Default: String)

Instance member DateTime

SalDateTime: Gets or sets the datetime value of this column in the table context row.

Instance member Dock

DockStyle: Gets the fixed docking behavior of a table column. (Default: None)

Instance member EditMask

String: Gets or sets the cell input mask while preserving unmasked text. (Default: "")

Instance member EnableSpellChecker

Boolean: Gets or sets whether the cell editor uses the built-in spell checker. (Default: False)

Instance member Flags

Int32: Gets or replaces the column configuration flags.

Instance member Format

String: Gets or sets the formatting picture used for cell values. (Default: "")

An invalid numeric or date picture leaves the stored SAL picture unchanged, although the supplied picture is still forwarded to the attached grid columns.

Instance member GridCol

Column: Gets or binds the underlying main-grid column.

Instance member Id

Int32: Gets the column identifier, calculating and caching it on first access.

Instance member ImeMode

ImeMode: Gets the fixed input-method setting.

Instance member IsAutomatic

Boolean: Gets whether this column was generated automatically from a query result.

Instance member IsDynamic

Boolean: Gets whether this column was created dynamically.

Instance member Label

Control: Gets or sets the label associated with this control through the SAL window implementation.

Instance member Location

Point: Gets the horizontal position of the attached grid column.

Instance member MaxLength

Int32: Gets or sets the maximum input length. (Default: 100)

Instance member Modified

Boolean: Gets or sets the modification flag for this column in the table context row.

Instance member Name

String: Gets or sets the column name and synchronizes it with both grid columns.

Instance member NamedProperties

SalNamedProperties: Gets the SAL named-property collection associated with this control.

Instance member Number

SalNumber: Gets or sets the number value of this column in the table context row.

Instance member ParentTable

SalTableWindow: Gets the table that owns this column.

Instance member PasswordChar

Char: Gets or sets the character used to conceal cell text. (Default: "\0")

Instance member PasswordText

String: Gets the cached display string used for concealed cell text.

CellPopupBox: Gets the multiline popup-editor settings.

Instance member Position

Int32: Gets or sets the display position of the column.

Changing this property moves an attached grid column. Use SetColumnPosition to enforce locked-column restrictions. Throws:

Instance member ReadOnly

Boolean: Gets or sets the column read-only flag. (Default: False)

Instance member RightToLeft

Boolean: Gets the unsupported right-to-left setting.

Instance member Selected

Boolean: Gets or sets column selection in the main and split grids.

Instance member Size

Size: Gets the attached column width and this control's client height.

Instance member SplitGridCol

Column: Gets or binds the corresponding column in the split grid.

Instance member TabIndex

Int32: Gets the column position used for tab order.

Instance member TabStop

Boolean: Gets whether the column participates in tab navigation.

Instance member Text

String: Gets or sets the text value of this column in the table context row.

Instance member TextAlign

HorizontalAlignment: Gets or sets horizontal cell-text alignment. (Default: Left)

Instance member Title

String: Gets or sets the text displayed in the column header. (Default: "")

Instance member TitleAlign

HorizontalAlignment: Gets or sets horizontal alignment of the column header. (Default: Center)

Instance member Width

Int32: Gets or sets the column width in pixels. (Default: 80)

Instance member WordWrap

Boolean: Gets or sets whether multiline cell text wraps. (Default: False)

Methods

Instance member AddListItem(sName)

Adds a text item, respecting the list sorting setting.

ParameterTypeDescription
sNameSalStringThe item text.

Returns: SalNumber. The added item index, or Sys.LB_Err for an unsupported target.

Instance member Average(flagsOn, flagsOff)

Calculates the mean of this column over rows matching the specified flags.

ParameterTypeDescription
flagsOnInt32Row flags for which at least one must be set, or zero to omit this test.
flagsOffInt32Row flags that must all be clear.

Returns: Decimal. The sum divided by the number of matching rows, or zero when none match.

The original context row is restored when the operation finishes.

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; otherwise, false.

Instance member CenterWindow()

Centers this window within its parent or, for a top-level form, its owner or screen working area.

Returns: SalBoolean. True when the translated control exists; otherwise, false.

A top-level form is constrained to the selected screen working area. A control without a parent is unchanged unless it is a top-level form.

Instance member Clear()

Clears the value or selection appropriate to this control type.

Returns: SalBoolean. False for an unavailable control or a form; otherwise, true.

Editable controls and labels have their text cleared; check boxes are unchecked; list selections are cleared. A date/time picker is set to the current date and time. Unrecognized control types are unchanged.

Instance member ClearCursor(type)

Restores the default cursor for a role, using the I-beam for TextBox subclasses.

ParameterTypeDescription
typeSalNumberThe cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop.

Returns: SalBoolean. True if the cursor is assigned to a supported role; otherwise, false.

Instance member ClearList()

Removes all items from the list.

Returns: SalBoolean. True when the target supports lists; otherwise, false.

Instance member DefineCheckBoxColumn(flags, checkedValue, uncheckedValue)

Configures this column as check boxes with mapped cell values.

ParameterTypeDescription
flagsSalNumberSys.COL_CheckBox_IgnoreCase to compare values without case sensitivity, or zero.
checkedValueSalStringThe value representing a checked cell.
uncheckedValueSalStringThe value representing an unchecked cell.

Returns: SalBoolean. True after applying the configuration.

Instance member DefineDropDownListColumn(flags, lines)

Configures this column as combo-box cells.

ParameterTypeDescription
flagsSalNumberThe Sys.COL_DropDownList_Sorted, Editable, and Auto options. VScroll is ignored.
linesSalNumberRetained for SAL compatibility; ignored.

Returns: SalBoolean. True after applying the configuration.

Instance member DefinePopupEditColumn(flags, lines)

Configures this column to use a multiline popup editor.

ParameterTypeDescription
flagsSalNumberRetained for SAL compatibility; ignored.
linesSalNumberThe number of lines for the popup editor.

Returns: SalBoolean. True after applying the configuration.

Instance member DeleteListItem(nIndex)

Removes the item at a zero-based index.

ParameterTypeDescription
nIndexSalNumberThe item to remove.

Returns: SalNumber. The remaining item count, or Sys.LB_Err for an invalid index or unsupported target.

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.

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

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.

Native disabled styles are also cleared. When needed, tab navigation is restored except for unchecked radio buttons.

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

Instance member FindChild(windowName)

Searches this window for a child control by name.

ParameterTypeDescription
windowNameSalStringThe child control name to locate.

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

Instance member FireWindowActions(nMsg, nMywParam, nMylParam)

Invokes this control's SAL action handlers directly and returns their result.

ParameterTypeDescription
nMsgSalNumberThe action message code.
nMywParamSalNumberThe first action parameter.
nMylParamSalNumberThe second action parameter.

Returns: SalNumber. The result stored in the dispatched action arguments.

Instance member FormUnitsToPixels(formUnits, vertical)

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

ParameterTypeDescription
formUnitsSalNumberThe length in form units.
verticalSalBooleanTrue for a vertical measurement; false for a horizontal measurement.

Returns: SalNumber. The converted pixel length.

Static member FromControl(ctrl)

Resolves the derived SAL control and returns it as a table column.

ParameterTypeDescription
ctrlControlThe control or secondary-base control to resolve.

Returns: SalTableColumn. The resolved table column, or null if it is not a SalTableColumn.

Instance member GetCellType(type)

Copies the editor type into a SAL number.

ParameterTypeDescription
type by referenceSalNumberReceives the CellType numeric value.

Returns: SalBoolean. Always true.

Instance member GetCellType()

Returns the numeric cell-editor type.

Returns: SalNumber. The current CellType value.

Instance member GetClassName()

Gets the translated application class name associated with this control.

Returns: SalString. The class name, an empty string for a runtime-defined class, or a null SAL string for an unresolved or native control.

Forms use their base type; nested table-window types are walked upward to a non-nested type.

Instance member GetColumnFlags(flags)

Tests whether any of the requested column flags are set.

ParameterTypeDescription
flagsSalNumberThe Sys.COL_* mask to test.

Returns: SalBoolean. True when at least one masked flag is set; false for a zero mask.

Instance member GetColumnID()

Returns the column identifier in the owning table.

Returns: SalNumber. The one-based index in the table column collection, or -1 when not found.

Instance member GetColumnPosition()

Returns the display position of the column.

Returns: SalNumber. The one-based data-column position.

Instance member GetColumnTitle(text, maxLen)

Copies the column title, limited to a specified length.

ParameterTypeDescription
text by referenceSalStringReceives the truncated title.
maxLenSalNumberThe maximum number of characters to return.

Returns: SalNumber. The number of characters copied.

Instance member GetColumnTitle(maxLen)

Returns the column title limited to a specified length.

ParameterTypeDescription
maxLenSalNumberThe maximum number of characters to return.

Returns: SalString. The leading title characters.

Instance member GetColumnWidth(width)

Copies the column width in horizontal form units.

ParameterTypeDescription
width by referenceSalNumberReceives the converted width.

Returns: SalBoolean. Always true.

Instance member GetColumnWidth()

Returns the column width converted from pixels to horizontal form units.

Returns: SalNumber. The width in form units.

Instance member GetControlType()

Gets the SAL window type of this control.

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

Instance member GetDataLength()

Gets the configured maximum input length.

Returns: SalNumber. The character limit, -1 for native default or unlimited limits, or zero for an unsupported target.

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

Instance member GetFirstChild(typeMask)

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

ParameterTypeDescription
typeMaskSalNumberThe 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 GetFont(name, size, enhancement)

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

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

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

Instance member GetFormat(sPicture)

Copies the current display picture.

ParameterTypeDescription
sPicture by referenceSalStringReceives the picture, including an empty picture; remains unchanged for an unsupported target.

Returns: SalBoolean. True when the picture is available; otherwise, false.

Instance member GetFormat()

Gets the current display picture.

Returns: SalString. The picture, or a null string for an unsupported target.

Instance member GetFormatCode()

Gets the SAL format constant for the current picture, character casing, or password display.

Returns: SalNumber. A Sys.FMT_Format_* value; custom pictures return FMT_Format_Picture.

Instance member GetFormattedText(sText, bFormat)

Copies the field value as formatted or unformatted text.

ParameterTypeDescription
sText by referenceSalStringReceives the text when the target supports editing.
bFormatSalBooleanTrue to apply the picture or retain a string input mask; false to use the value text.

Returns: SalBoolean. True when text is available; otherwise, false, leaving text unchanged.

Instance member GetFormattedText(bFormat)

Gets the field value as formatted or unformatted text.

ParameterTypeDescription
bFormatSalBooleanTrue to apply the picture or retain a string input mask; false to use the value text.

Returns: SalString. The value text, an empty string for an empty value, or a null string for an unsupported target.

Instance member GetInputMask(sMask)

Copies the input mask when a nonempty mask is configured.

ParameterTypeDescription
sMask by referenceSalStringReceives the mask on success; remains unchanged otherwise.

Returns: SalBoolean. True for a nonempty mask; otherwise, false.

Instance member GetInputMask()

Gets the input mask used by the field.

Returns: SalString. The configured mask, or a null string for an unsupported target.

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

Instance member GetLabelText(sText, nMaxLength)

Copies the associated label text to a supplied variable.

ParameterTypeDescription
sText by referenceSalStringReceives the label text when it can be read.
nMaxLengthSalNumberThe maximum number of leading characters to copy.

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

Instance member GetLabelText(nMaxLength)

Gets this control's associated label text.

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

Instance member GetListItemsCount()

Counts the entries in the list.

Returns: SalNumber. The item count, or Sys.LB_Err for an unsupported target.

Instance member GetListItemState(index)

Checks whether a list item is selected.

ParameterTypeDescription
indexSalNumberThe zero-based item index.

Returns: SalBoolean. True when the item is selected; otherwise, false.

Instance member GetListItemText(index, text)

Copies the text of an indexed list item.

ParameterTypeDescription
indexSalNumberThe zero-based item index.
text by referenceSalStringReceives the text on success; remains unchanged when the item is unavailable.

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

Instance member GetListItemText(index)

Gets the text of an indexed list item.

ParameterTypeDescription
indexSalNumberThe zero-based item index.

Returns: SalString. The item text, or a null string when the item is unavailable.

Instance member GetListItemTextLength(index)

Gets the number of characters in a list item.

ParameterTypeDescription
indexSalNumberThe zero-based item index.

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

Instance member GetListSelectedFile(fileName)

Decodes the selected file-list entry into a file, directory, or drive name.

ParameterTypeDescription
fileName by referenceSalStringReceives the decoded name; remains unchanged when no item is selected.

Returns: SalBoolean. True for a directory or drive; false for an ordinary file or no selection.

Instance member GetListSelectedFile()

Gets the decoded name of the selected file-list entry.

Returns: SalString. The file name, a directory with a trailing separator, a drive ending in a colon, or an empty string when nothing is selected.

Instance member GetListSelectedIndex()

Gets the first selected item index.

Returns: SalNumber. The zero-based index, or Sys.LB_Err when no item is selected or the target is unsupported.

Instance member GetListSelectedItems(nSelectedArray)

Replaces an array with the selected indices of a multi-selection list.

ParameterTypeDescription
nSelectedArraySalArray<SalNumber>The destination, made dynamic and reset before indices are copied.

Returns: SalBoolean. True when at least one index is copied; false for an empty selection or a list without multi-selection.

Instance member GetListSelectedItemsCount()

Counts selected entries in a multi-selection list.

Returns: SalNumber. The selected count, zero when selection is disabled, or -1 for single-selection mode.

Instance member GetLocation(x, y)

Reads this control's location in form units.

ParameterTypeDescription
x by referenceSalNumberReceives the horizontal location.
y by referenceSalNumberReceives the vertical location.

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

Instance member GetName(text)

Copies this control's name to the supplied variable.

ParameterTypeDescription
text 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(typeMask)

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

ParameterTypeDescription
typeMaskSalNumberThe 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 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(name, value)

Reads a SAL named property into a supplied variable.

ParameterTypeDescription
nameSalStringThe property name.
value 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(name)

Gets the value of a SAL named property.

ParameterTypeDescription
nameSalStringThe property name.

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

Instance member GetSize(width, height)

Reads this control's size in form units.

ParameterTypeDescription
width by referenceSalNumberReceives the width.
height by referenceSalNumberReceives the height.

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

Instance member GetText(text, maxLen)

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

ParameterTypeDescription
text by referenceSalStringReceives the retrieved text.
maxLenSalNumberThe 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(maxLen)

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

ParameterTypeDescription
maxLenSalNumberThe 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 GetTextUnmasked(sText)

Copies text with removable input-mask characters stripped.

ParameterTypeDescription
sText by referenceSalStringReceives the unmasked text.

Returns: SalBoolean. True when the translated target exists; otherwise, false.

Instance member GetTextUnmasked()

Gets text with removable input-mask characters stripped.

Returns: SalString. The unmasked text, or a null string when the translated target does not exist.

Instance member GetWindowColor(colorIndex)

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

ParameterTypeDescription
colorIndexSalNumberThe Sys.COLOR_Index* color component to read.

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

Transparent colors are reported as Sys.COLOR_None. Table-column window colors use the system window colors; cell colors use the column settings.

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 HideWindowAndLabel()

Hides this control and its associated label.

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

Instance member InsertListItem(nIndex, sAdd)

Inserts text into the list at a requested position.

ParameterTypeDescription
nIndexSalNumberThe zero-based insertion index, or -1 to append using normal sorting behavior.
sAddSalStringThe item text.

Returns: SalNumber. The resulting index, or Sys.LB_Err for an invalid index or unsupported target.

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(typeClass)

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

ParameterTypeDescription
typeClassTypeThe 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 IsEmpty()

Checks whether the unmasked text is null or empty.

Returns: SalBoolean. True for empty edit text; 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 IsModified()

Reads this control's SAL modification flag.

Returns: SalBoolean. True if the control reports a modified value; otherwise, false.

Instance member IsValid()

Validates the value against the configured data type without applying display formatting.

Returns: SalBoolean. True when the value passes data-type validation; otherwise, false.

Instance member IsValidDateTime()

Checks the displayed text as a date and time using the current picture and culture.

Returns: SalBoolean. True when the value is valid; otherwise, false.

Instance member IsValidDecimal(nPrecision, nScale)

Checks the displayed text as a decimal with the specified digit limits, picture, and culture.

ParameterTypeDescription
nPrecisionSalNumberThe maximum total number of digits.
nScaleSalNumberThe maximum number of fractional digits.

Returns: SalBoolean. True when the value meets the decimal constraints; otherwise, false.

Instance member IsValidInteger()

Checks the displayed text as an integer using the current picture.

Returns: SalBoolean. True when the value is a valid integer; otherwise, false.

Instance member IsValidNumber()

Checks the unmasked text as a number using the current picture and culture.

Returns: SalBoolean. True when the value is a valid number; otherwise, false.

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(idEvent)

Stops the native window timer with the specified identifier.

ParameterTypeDescription
idEventSalNumberThe timer identifier to remove.

Returns: SalBoolean. The native timer-removal result, or false if the control cannot be resolved.

Instance member MoveWindow(xOffset, yOffset)

Moves this control by an offset expressed in form units.

ParameterTypeDescription
xOffsetSalNumberThe horizontal offset to add to the current position.
yOffsetSalNumberThe 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 OnBackColorChanged(e)

Copies the background color to both grid columns before raising the change event.

ParameterTypeDescription
eEventArgsThe event data.

Protected member OnEnabledChanged(e)

Updates editability and cancels an active cell editor when the column is disabled.

ParameterTypeDescription
eEventArgsThe event data.

Protected member OnFontChanged(e)

Copies the font to both grid columns before raising the change event.

ParameterTypeDescription
eEventArgsThe event data.

Protected member OnForeColorChanged(e)

Copies the foreground color to both grid columns before raising the change event.

ParameterTypeDescription
eEventArgsThe event data.

Protected member OnInvalidated(e)

Invalidates both grid columns before raising the invalidation event.

ParameterTypeDescription
eInvalidateEventArgsThe invalidation event data.

Protected member OnParentChanged(e)

Resolves the owning table from the new parent before raising the parent-change event.

ParameterTypeDescription
eEventArgsThe event data.

Protected member OnSizeChanged(e)

Copies the control width to both grid columns before raising the change event.

ParameterTypeDescription
eEventArgsThe event data.

Instance member PixelsToFormUnits(numPixels, vertical)

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

ParameterTypeDescription
numPixelsSalNumberThe pixel length to convert.
verticalSalBooleanTrue for a vertical measurement; false for a horizontal measurement.

Returns: SalNumber. The converted length in form units.

Instance member PopulateList(hSql, sSelect)

Replaces list items with tab-separated rows from a SQL result and calculates column tab stops.

ParameterTypeDescription
hSqlSalSqlHandleThe connected SQL handle used to execute and fetch results.
sSelectSalStringThe statement to prepare, or an empty value to execute the existing prepared statement.

Returns: SalBoolean. True after loading the result; false for an unsupported target or failed preparation or execution.

Instance member PopulateList(hSql, sSelect, errorHandler)

Loads SQL result rows into the list within a temporary SQL error-handler context.

ParameterTypeDescription
hSqlSalSqlHandleThe SQL handle used to execute and fetch results.
sSelectSalStringThe statement to prepare, or an empty value to reuse the prepared statement.
errorHandlerWhenSqlErrorHandlerThe SQL error callback active during population.

Returns: SalBoolean. True after loading the result; false for an unsupported target or failed preparation or execution.

Instance member PopulateListFiles(ctrlPath, pathName, attributes)

Replaces list items with matching files, directories, and drives.

ParameterTypeDescription
ctrlPathControlThe control that receives the resolved directory path.
pathName by referenceSalStringThe directory and wildcard specification; receives the resulting file pattern.
attributesSalNumberSys.FA_* flags controlling which entries are included.

Returns: SalBoolean. True after population; false when the target is unsupported or changing directory fails.

This operation can change the process current directory.

Instance member PostMessage(nMsg, nMywParam, nMylParam)

Posts a native Windows message to this control for asynchronous processing.

ParameterTypeDescription
nMsgSalNumberThe Windows or SAL message code.
nMywParamSalNumberThe first message parameter.
nMylParamSalNumberThe second message parameter.

Returns: SalBoolean. True if the native message was posted; false for an unavailable or disposed control, or if posting fails.

Instance member QueryCheckBoxColumn(flags, checkedValue, uncheckedValue)

Retrieves the value mapping of a check-box column.

ParameterTypeDescription
flags by referenceSalNumberReceives Sys.COL_CheckBox_IgnoreCase when enabled, or zero.
checkedValue by referenceSalStringReceives the checked value.
uncheckedValue by referenceSalStringReceives the unchecked value.

Returns: SalBoolean. True for a check-box column; otherwise false without changing the outputs.

Instance member QueryDropDownListColumn(flags, lines)

Retrieves the combo-box options for this column.

ParameterTypeDescription
flags by referenceSalNumberReceives the sorted, editable, and automatic-drop-down flags.
lines by referenceSalNumberRetained for compatibility; left unchanged.

Returns: SalBoolean. True for a combo-box column; otherwise false without changing the outputs.

Instance member QueryPopupEditColumn(flags, lines)

Retrieves the popup editor configuration.

ParameterTypeDescription
flags by referenceSalNumberReceives zero on success.
lines by referenceSalNumberReceives the configured popup line count.

Returns: SalBoolean. True for a popup-edit column; otherwise false without changing the outputs.

Instance member SendMessage(nMsg, nMywParam, nMylParam)

Sends a native Windows message to this control synchronously.

ParameterTypeDescription
nMsgSalNumberThe Windows or SAL message code.
nMywParamSalNumberThe first message parameter.
nMylParamSalNumberThe second message parameter.

Returns: SalNumber. The native message result, or zero when the control is unavailable or disposed.

Instance member SendMessageToChildren(nMsg, nMywParam, nMylParam)

Sends a message to this control's child windows and eligible descendants.

ParameterTypeDescription
nMsgSalNumberThe Windows or SAL message code.
nMywParamSalNumberThe first message parameter.
nMylParamSalNumberThe second message parameter.

Returns: SalBoolean. True after dispatching; false when the parent is unavailable or disposed.

Traversal does not descend into embedded forms or user controls. Close and destroy messages for ordinary child controls are routed to their action handlers instead of their native window procedures.

Protected member SetBoundsCore(x, y, width, height, specified)

Applies designer bounds, or constrains the runtime control to zero location and height while retaining its width.

ParameterTypeDescription
xInt32The requested horizontal position.
yInt32The requested vertical position.
widthInt32The requested width.
heightInt32The requested height.
specifiedBoundsSpecifiedThe bounds components being changed.

Instance member SetCellTextColor(color, discardable)

Sets the text color of this column in the current context row.

ParameterTypeDescription
colorSalNumberThe SAL color value.
discardableSalBooleanRetained for compatibility; ignored.

Returns: SalBoolean. The result of applying the cell-text color.

Instance member SetCellTextColor(color)

Sets the text color of this column in the current context row.

ParameterTypeDescription
colorSalNumberThe SAL color value.

Returns: SalBoolean. The result of applying the cell-text color.

Instance member SetColumnFlags(flags, set)

Sets or clears the specified column configuration flags.

ParameterTypeDescription
flagsSalNumberThe Sys.COL_* flags to change.
setSalBooleanTrue to set the flags; false to clear them.

Returns: SalBoolean. True after applying the flags.

Instance member SetColumnPosition(position)

Moves the column to a display position outside the locked-column region.

ParameterTypeDescription
positionSalNumberThe desired one-based position.

Returns: SalBoolean. False for a position below 1 or when either the source or destination is locked; otherwise true.

Instance member SetColumnTitle(title)

Changes the column-header text.

ParameterTypeDescription
titleSalStringThe new title.

Returns: SalBoolean. True after assigning the title.

Instance member SetColumnWidth(width)

Sets the column width after converting horizontal form units to pixels.

ParameterTypeDescription
widthSalNumberThe requested width in form units.

Returns: SalBoolean. True after assigning the width.

Instance member SetContextMenu(sMenuName, nFlags)

Creates and assigns a context menu for this control.

ParameterTypeDescription
sMenuNameSalStringThe menu type name to resolve.
nFlagsSalNumberUse Sys.CM_TableCell to assign the table's cell-editor menu; otherwise, assign the control's context menu.

Returns: SalBoolean. True if a control and menu type resolve and the menu is created; otherwise, false.

When called during a SAL context-menu action, the created menu is also shown at the current mouse position.

Instance member SetContextMenu(menuType, flags)

Creates and assigns a context menu for this control.

ParameterTypeDescription
menuTypeTypeThe menu type to instantiate.
flagsSalNumberUse Sys.CM_TableCell to assign the table's cell-editor menu; otherwise, assign the control's context menu.

Returns: SalBoolean. True if a control and menu type resolve and the menu is created; otherwise, false.

When called during a SAL context-menu action, the created menu is also shown at the current mouse position.

Instance member SetCursor(resource, type)

Loads a cursor resource and assigns it to the requested role.

ParameterTypeDescription
resourceSalResourceCursorThe cursor resource to load.
typeSalNumberThe cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop.

Returns: SalBoolean. True if the cursor is assigned to a supported role; otherwise, false.

Instance member SetCursor(resourceId, type)

Assigns a system cursor or a cursor identified by its native handle to the requested role.

ParameterTypeDescription
resourceIdInt32A Sys.CURSOR_* identifier, or a native cursor handle represented as an integer.
typeSalNumberThe cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop.

Returns: SalBoolean. True if the cursor is assigned to a supported role; otherwise, false.

Instance member SetCursor(blob, type)

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

ParameterTypeDescription
blobSalStringThe cursor file data stored in a SAL binary string.
typeSalNumberThe cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop.

Returns: SalBoolean. True if loading and assignment succeed; otherwise, false.

Instance member SetCursorFile(file, type)

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

ParameterTypeDescription
fileSalStringThe cursor file path.
typeSalNumberThe cursor role: Sys.CURSOR_Window, Sys.CURSOR_DragDrop, or Sys.CURSOR_DisableDrop.

Returns: SalBoolean. True if loading and assignment succeed; otherwise, false.

Instance member SetDataLength(length)

Sets the maximum input length.

ParameterTypeDescription
lengthSalNumberThe character limit, or -1 to select the native unlimited setting.

Returns: SalBoolean. True when the target supports editing; otherwise, false.

Instance member SetFocus()

Moves keyboard focus to this control, deferring the change when SAL validation is in progress.

Returns: SalWindowHandle. The previously focused managed control as a SAL handle, or a null handle if the target is unavailable, a table column, an ActiveX host, disabled, or hidden.

Instance member SetFont(name, size, enhancement)

Creates and assigns a font to this control.

ParameterTypeDescription
nameSalStringThe font family name.
sizeSalNumberThe font size in points.
enhancementSalNumberThe combined Sys.FONT_Enh* style flags.

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

Instance member SetFormat(sPicture)

Assigns a display picture, translating encoded SAL numeric pictures when present.

ParameterTypeDescription
sPictureSalStringThe display picture to assign.

Returns: SalBoolean. True when the target supports formatting; this does not indicate whether its Format setter accepted the picture.

Instance member SetFormatCode(nFormat)

Applies a standard SAL picture, character casing, or password display setting.

ParameterTypeDescription
nFormatSalNumberThe Sys.FMT_Format_* setting. FMT_Format_Picture leaves the existing picture unchanged.

Returns: SalBoolean. True when the setting is supported; otherwise, false.

Instance member SetInputMask(sMask)

Assigns the field input mask.

ParameterTypeDescription
sMaskSalStringThe mask to apply.

Returns: SalBoolean. True when the target supports edit masks; otherwise, false.

Instance member SetLabelText(sText)

Assigns the text of this control's associated label.

ParameterTypeDescription
sTextSalStringThe label text to display.

Returns: SalBoolean. True if an associated label was found and updated; otherwise, false.

Instance member SetListRedraw(redraw)

Enables or disables native list repainting.

ParameterTypeDescription
redrawSalNumberThe desired redraw state converted to a Boolean.

Returns: SalBoolean. True for an available target, including one without a native handle; otherwise, false.

Enabling redraw refreshes an existing list handle.

Instance member SetListSelectedIndex(index)

Replaces the current selection or applies a multi-selection sentinel.

ParameterTypeDescription
indexSalNumberThe item index. In multi-selection mode, -1 selects all and other invalid indices clear all. In single-selection mode, -1 clears selection.

Returns: SalBoolean. True for a processed multi-selection request or a successfully selected single item; false when clearing single selection or when the request is unsupported.

Instance member SetListSelectedItems(index, select)

Changes selected states in a multi-selection list.

ParameterTypeDescription
indexSalNumberThe item index, or -1 for all items.
selectSalBooleanTrue to select; false to clear selection.

Returns: SalBoolean. True when the target supports multi-selection; otherwise, false. Invalid individual indices are ignored by SAL list controls.

Instance member SetListSelectedText(indexStart, text)

Finds and selects an item by its text prefix while suppressing SAL selection messages.

ParameterTypeDescription
indexStartSalNumberThe index after which to begin searching, or -1 to search from the first item. The search can wrap.
textSalStringThe nonempty text prefix to find.

Returns: SalNumber. The matched index, or -1 when no match is found.

Instance member SetListTabStops(tabStops)

Sets the tab positions used to align tab-separated list text.

ParameterTypeDescription
tabStopsSalArray<SalNumber>Tab positions expressed in horizontal form units.

Returns: SalBoolean. True when tab stops are assigned; false for an unsupported target or null array.

Instance member SetLocation(x, y)

Sets this control's location in form units.

ParameterTypeDescription
xSalNumberThe new horizontal coordinate.
ySalNumberThe 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 SetModified(bSet)

Sets this control's SAL modification flag.

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

Instance member SetProperty(name, value, length)

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

ParameterTypeDescription
nameSalStringThe property name.
valueSalStringThe value to assign.
lengthSalNumberThe number of leading characters to retain.

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

Instance member SetSize(width, height)

Sets this control's dimensions in form units.

ParameterTypeDescription
widthSalNumberThe new width.
heightSalNumberThe new height.

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

Instance member SetText(text)

Assigns the control's displayed text.

ParameterTypeDescription
textSalStringThe text to assign.

Returns: SalBoolean. True if the translated control exists and assignment completes; otherwise, false.

An empty string is passed as null when assigning combo-box text.

Instance member SetText(sValue, bFormat)

Assigns the field value through its typed value conversion.

ParameterTypeDescription
sValueSalStringThe text to assign.
bFormatSalBooleanRetained for compatibility; this argument is ignored.

Returns: SalBoolean. True when the target supports editing; otherwise, false.

Instance member SetTimer(idEvent, elapseMilliSec)

Creates or updates a native window timer for this control.

ParameterTypeDescription
idEventSalNumberThe timer identifier.
elapseMilliSecSalNumberThe requested interval in milliseconds.

Returns: SalBoolean. True if the native timer was created; otherwise, false.

Protected member SetVisibleCore(value)

Synchronizes the column visibility flag and clears the focus cell when hiding this column.

ParameterTypeDescription
valueBooleanTrue to show the column; false to hide it.

Instance member SetWindowColor(colorIndex, color)

Assigns a SAL window, table-cell, text, or transparent-image color.

ParameterTypeDescription
colorIndexSalNumberThe Sys.COLOR_Index* component to update.
colorSalNumberThe SAL color value.

Returns: SalBoolean. True for a recognized color index and resolved control, even when the component does not apply to that control; otherwise, false.

Cell colors apply to table columns; window colors apply to other controls. Transparent colors require the SAL picture-control contract.

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 ShowWindowAndLabel()

Shows this control and its associated label.

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

Instance member Sort(flags)

Fetches all rows and sorts the main grid by this column if editing can finish.

ParameterTypeDescription
flagsSortFlagsThe comparison and sort-direction options.

The grid selection events are suppressed during sorting, and a sort indicator is displayed afterward.

Instance member Sum(flagsOn, flagsOff)

Adds this column's numeric values over rows matching the specified flags.

ParameterTypeDescription
flagsOnInt32Row flags for which at least one must be set, or zero to omit this test.
flagsOffInt32Row flags that must all be clear.

Returns: Decimal. The total, or zero for a date/time column.

The original context row is restored when the operation finishes.

Instance member TrackPopupMenu(menuName, flags, x, y)

Creates and displays a temporary popup menu at screen coordinates.

ParameterTypeDescription
menuNameSalStringThe menu type name to resolve.
flagsSalNumberSAL TPM_* alignment and cursor-position flags; center alignment and TPM_ContextMenu are unsupported.
xSalNumberThe screen X coordinate, unless TPM_CursorX selects the cursor position.
ySalNumberThe screen Y coordinate, unless TPM_CursorY selects the cursor position.

Returns: SalBoolean. True after the popup is shown; false when the target or menu cannot be resolved.

The previous context menu is restored after display and the temporary menu is queued for disposal.

Instance member TrackPopupMenu(menuType, flags, x, y)

Creates and displays a temporary popup menu at screen coordinates.

ParameterTypeDescription
menuTypeTypeThe menu type to instantiate.
flagsSalNumberSAL TPM_* alignment and cursor-position flags; center alignment and TPM_ContextMenu are unsupported.
xSalNumberThe screen X coordinate, unless TPM_CursorX selects the cursor position.
ySalNumberThe screen Y coordinate, unless TPM_CursorY selects the cursor position.

Returns: SalBoolean. True after the popup is shown; false when the target or menu cannot be resolved.

The previous context menu is restored after display and the temporary menu is queued for disposal.

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 Validate()

Validates the data type and applies the display format, showing an error dialog if validation fails.

Returns: SalBoolean. True when validation succeeds; otherwise, false.

Instance member Validate(validate)

Validates the data type and applies the display format on success.

ParameterTypeDescription
validateSalNumberUse Sys.FMT_Validate_Dialog to display a validation error dialog; other values suppress it.

Returns: SalBoolean. True when validation succeeds; otherwise, false.

Instance member WinHelp(file, command, numData, strData)

Invokes the legacy Windows Help API for this control.

ParameterTypeDescription
fileSalStringThe help file path.
commandSalNumberThe Sys.HELP_* command.
numDataSalNumberThe numeric topic or index for HELP_Context and HELP_SetIndex.
strDataSalStringThe lookup text for HELP_Key.

Returns: SalBoolean. The native help result, or false for an empty file name.

Protected member WndProc(m)

Routes the native window message through the SAL window implementation.

ParameterTypeDescription
m by referenceMessageThe message to process, including its mutable result.

Instance member Yield()

Dispatches one pending message for this window, or processes application messages when no window handle exists.

Message dispatch can reenter application code.

Events

Instance member MessageActions

SalMessageHandler Provides the legacy SAL message-handler event.

Use WindowActions for new handlers.

Instance member WindowActions

WindowActionsEventHandler Occurs when this control dispatches a SAL or custom window action.

Implements

NameDescription
ISalControlProvides access to a SAL control's typed value, associated label, and modification state.
ISalEditControlExtends the SAL control contract with validation, display formatting, edit masks, and culture settings.
ISalListControlProvides SAL list operations over list-box and combo-box items and selections.
ISalWindowExposes SAL message dispatch and runtime metadata for child controls, forms, dialogs, and MDI windows.