SalTableColumn
Namespace: PPJ.Runtime.Windows
Assembly: PPJ.Web.50 (5.0.0.0)
Defines a SAL table column, its per-row value, display formatting, editor, and window actions.
- C#
- VB.NET
public class SalTableColumn : Control, ISalWindow, ISalEditControl, ISalControl, ISalListControl, IConvertible, IComparer
Public Class SalTableColumn
Inherits Control
Implements ISalWindow, ISalEditControl, ISalControl, ISalListControl, IConvertible, IComparer
Example:
SalTableWindow table = new SalTableWindow();
SalTableColumn name = new SalTableColumn();
name.Title = "Name";
name.Width = 160;
table.Controls.Add(name);
Constructors
SalTableColumn()
Creates a visible, editable, sortable column with width 80 pixels and maximum text length 100.
Properties
AllowDrag
Boolean: Gets false. Assignments are ignored for this table-column proxy. (Default: False)
AllowDrop
Boolean: Gets the unsupported drag-and-drop setting. (Default: False)
AllowHtml
Boolean: Gets or sets whether cell text may contain HTML, propagating the setting to both grid columns. (Default: False)
Anchor
AnchorStyles: Gets the fixed anchoring behavior of a table column. (Default: Top, Left)
Anonymous
Boolean: Gets false. Assignments are ignored for this table-column proxy.
AppearanceKey
String: Gets null. Assignments are ignored for this table-column proxy. (Default: null)
AutoEllipsis
Boolean: Gets or sets COL_IndicateOverflow to show an ellipsis for text that does not fit. (Default: False)
BackColor
Color: Gets or sets the column background color. A stored SystemColors.Window value inherits the parent table’s background.
BackgroundImage
Image: Gets the unsupported background-image setting. (Default: null)
BackgroundImageLayout
ImageLayout: Gets the unsupported background-image layout setting. (Default: None)
BackgroundImageSource
String: Gets null. Assignments are ignored for this table-column proxy. (Default: null)
CausesValidation
Boolean: Gets the fixed validation setting for a table column.
CellTextColor
Color: Gets or sets the current-context cell’s text color. An empty assigned color restores the main grid’s foreground; an unavailable cell reads as Color.Empty.
CellType
CellType: Gets or sets the cell editor type, recreating attached main and split columns at their existing indices and display positions when it changes. (Default: Standard)
CharacterCasing
CharacterCasing: Gets or sets whether input is converted to uppercase, lowercase, or left unchanged. (Default: Normal)
CheckBox
CellCheckBox: Gets the checked and unchecked value mapping for check-box cells.
ComboBox
CellComboBox: Gets the list and editor settings for combo-box cells.
ContextMenu
ContextMenu: Gets or sets the context menu attached to both grid columns. (Default: null)
CultureInfo
CultureInfo: Gets or sets the culture used for formatting and masks, inheriting the parent table’s culture at runtime when no local culture is set.
Throws:
- ArgumentException The assigned culture is neutral.
Cursor
Cursor: Gets Cursors.Default. Assignments are ignored for this table-column proxy. (Default: null)
CustomEditor
Control: Gets or sets a custom cell editor. A non-null editor is hidden as a standalone control and selects the Custom cell type. (Default: null)
The setter updates the main-grid editor. An existing split-grid editor is not updated by this implementation; it receives the configured editor when the split column is attached.
DataType
DataType: Gets or sets the SAL data type used to interpret cell values. (Default: String)
DateTime
SalDateTime: Gets or sets the datetime value of this column in the table context row.
Dock
DockStyle: Gets the fixed docking behavior of a table column. (Default: None)
EditMask
String: Gets or sets the input mask, preserving unmasked text and switching between MaskedText and Standard cell types. (Default: "")
EnableSpellChecker
Boolean: Gets or sets whether the cell editor uses the built-in spell checker. (Default: False)
Flags
Int32: Gets or replaces the column configuration flags.
Focusable
Boolean: Gets false. Assignments are ignored for this table-column proxy. (Default: True)
Font
Font: Gets or sets the font and applies it to both grid columns.
ForeColor
Color: Gets or sets the foreground color and applies it to both grid columns.
Format
String: Gets or sets the SAL format picture. Valid numeric and date pictures preserve the current typed value; invalid pictures leave the stored format unchanged. Date-picker columns also update their native format. (Default: "")
GridCol
DataGridViewColumn: Gets or sets the main-grid column, initializing its cell type, presentation, flags, editor, and association with this SAL column.
Id
Int32: Gets the lazily resolved SAL column identifier.
IsAutomatic
Boolean: Gets whether this column was generated automatically from a query result.
IsDynamic
Boolean: Gets whether this column was created dynamically.
KeepFormat
Boolean: Gets or sets whether display formatting is retained when a cell enters edit mode. (Default: False)
Label
Control: Gets or sets the label associated with this control through the SAL window implementation.
Location
Point: Gets the main-grid column’s location, or Point.Empty before attachment. Assignments are ignored.
Margin
Padding: Gets Padding.Empty. Assignments are ignored for this table-column proxy.
MaskedTextProvider
MaskedTextProvider: Gets the lazily created, culture-aware provider for a masked grid column, or null when no provider can be created.
MaximumSize
Size: Gets Size.Empty. Assignments are ignored for this table-column proxy.
MaxLength
Int32: Gets or sets the maximum text length, clamped to 0 through 32767, and updates both cell templates. (Default: 100)
MinimumSize
Size: Gets Size.Empty. Assignments are ignored for this table-column proxy.
Modified
Boolean: Gets or sets the modification flag for this column in the table context row.
Movable
Boolean: Gets false. Assignments are ignored for this table-column proxy.
Name
String: Gets or sets the column name and synchronizes it with both grid columns.
NamedProperties
SalNamedProperties: Gets the SAL named-property collection associated with this control.
Number
SalNumber: Gets or sets the number value of this column in the table context row.
ParentTable
SalTableWindow: Gets the table that owns this column.
PasswordChar
Char: Gets or sets the password mask character. Zero disables COL_Invisible; a nonzero character enables it. (Default: "\0")
PasswordText
String: Gets the cached display string used for concealed cell text.
PopupBox
CellPopupBox: Gets the multiline popup-editor settings.
Position
Int32: Gets or sets the one-based display position. Zero is normalized to one, and negative assignments throw ArgumentOutOfRangeException.
ReadOnly
Boolean: Gets or sets COL_ReadOnly, controlling whether cell values can be edited. (Default: False)
ResizableEdges
AnchorStyles: Gets AnchorStyles.None. Assignments are ignored for this table-column proxy.
RightToLeft
Boolean: Gets the unsupported right-to-left setting.
Selected
Boolean: Gets or sets column selection in the main and split grids.
Size
Size: Gets the main-grid column width and this control’s client height, or Size.Empty before attachment. Assignments are ignored.
SplitGridCol
DataGridViewColumn: Gets or sets the split-grid column, sharing the main cell template and cloning its default style.
TabIndex
Int32: Gets the one-based column Position. Assignments are ignored.
TabStop
Boolean: Gets false. Assignments are ignored for this table-column proxy. (Default: True)
Text
String: Gets or sets the text value of this column in the table context row. (Default: "")
TextAlign
HorizontalAlignment: Gets or sets left, center, or right cell-text alignment through the column flags. (Default: Left)
Title
String: Gets or sets the main-grid column caption, treating null as empty and updating header height when the number of caption lines changes. (Default: "")
TitleAlign
HorizontalAlignment: Gets or sets the column-header text alignment. (Default: Center)
Width
Int32: Gets the main-grid column width, or the stored control width before attachment, and sets the stored width in pixels. (Default: 80)
WordWrap
Boolean: Gets or sets COL_MultilineCell to enable multiline cell text. (Default: False)
Methods
AddListItem(sName)
Adds a text item, respecting the list sorting setting.
| Parameter | Type | Description |
|---|---|---|
| sName | SalString | The item text. |
Returns: SalNumber. The added item index, or Sys.LB_Err for an unsupported target.
Average(flagsOn, flagsOff)
Calculates the mean of this column over rows matching the specified flags.
| Parameter | Type | Description |
|---|---|---|
| flagsOn | Int32 | Row flags for which at least one must be set, or zero to omit this test. |
| flagsOff | Int32 | Row 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.
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.
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.
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.
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.
ClearList()
Removes all items from the list.
Returns: SalBoolean. True when the target supports lists; otherwise, false.
DefineCheckBoxColumn(flags, checkedValue, uncheckedValue)
Configures this column as check boxes with mapped cell values.
| Parameter | Type | Description |
|---|---|---|
| flags | SalNumber | Sys.COL_CheckBox_IgnoreCase to compare values without case sensitivity, or zero. |
| checkedValue | SalString | The value representing a checked cell. |
| uncheckedValue | SalString | The value representing an unchecked cell. |
Returns: SalBoolean. True after applying the configuration.
DefineDropDownListColumn(flags, lines)
Configures this column as a combo-box column with the requested sorting and input style.
| Parameter | Type | Description |
|---|---|---|
| flags | SalNumber | COL_DropDownList_Sorted, COL_DropDownList_Auto, and COL_DropDownList_Editable options. Auto takes precedence over Editable. |
| lines | SalNumber | Reserved for compatibility; ignored. |
Returns: SalBoolean. True.
COL_DropDownList_VScroll is ignored.
DefinePopupEditColumn(flags, lines)
Configures this column to use a multiline popup editor.
| Parameter | Type | Description |
|---|---|---|
| flags | SalNumber | Retained for SAL compatibility; ignored. |
| lines | SalNumber | The number of lines for the popup editor. |
Returns: SalBoolean. True after applying the configuration.
DeleteListItem(nIndex)
Removes the item at a zero-based index.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The item to remove. |
Returns: SalNumber. The remaining item count, or Sys.LB_Err for an invalid index or unsupported target.
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.
Dispose(disposing)
Marks this SAL window disposed before releasing the base control resources.
| Parameter | Type | Description |
|---|---|---|
| disposing | Boolean | True to release managed resources; false for finalization cleanup. |
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.
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.
FindChild(sWindowName)
Searches this window for a child control by name.
| Parameter | Type | Description |
|---|---|---|
| sWindowName | SalString | The child control name to locate. |
Returns: SalWindowHandle. The matching child handle, or a null SAL handle if no child is found.
FormUnitsToPixels(nFormUnits, bVertical)
Converts a length in form units to pixels using this control's form metrics.
| Parameter | Type | Description |
|---|---|---|
| nFormUnits | SalNumber | The length in form units. |
| bVertical | SalBoolean | True for a vertical measurement; false for a horizontal measurement. |
Returns: SalNumber. The converted pixel length.
FromControl(ctrl)
Resolves the derived SAL control and returns it as a table column.
| Parameter | Type | Description |
|---|---|---|
| ctrl | Control | The control or secondary-base control to resolve. |
Returns: SalTableColumn. The resolved table column, or null if it is not a SalTableColumn.
GetCellType(type)
Copies the editor type into a SAL number.
| Parameter | Type | Description |
|---|---|---|
| type | SalNumber | Receives the CellType numeric value. |
Returns: SalBoolean. Always true.
GetCellType()
Returns the numeric cell-editor type.
Returns: SalNumber. The current CellType value.
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.
GetColumnFlags(flags)
Tests whether any of the requested column flags are set.
| Parameter | Type | Description |
|---|---|---|
| flags | SalNumber | The Sys.COL_* mask to test. |
Returns: SalBoolean. True when at least one masked flag is set; false for a zero mask.
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.
GetColumnPosition()
Returns the display position of the column.
Returns: SalNumber. The one-based data-column position.
GetColumnTitle(text, maxLen)
Copies the column title, limited to a specified length.
| Parameter | Type | Description |
|---|---|---|
| text | SalString | Receives the truncated title. |
| maxLen | SalNumber | The maximum number of characters to return. |
Returns: SalNumber. The number of characters copied.
GetColumnTitle(maxLen)
Returns the column title limited to a specified length.
| Parameter | Type | Description |
|---|---|---|
| maxLen | SalNumber | The maximum number of characters to return. |
Returns: SalString. The leading title characters.
GetColumnWidth(width)
Copies the column width in horizontal form units.
| Parameter | Type | Description |
|---|---|---|
| width | SalNumber | Receives the converted width. |
Returns: SalBoolean. Always true.
GetColumnWidth()
Returns the column width converted from pixels to horizontal form units.
Returns: SalNumber. The width in form units.
GetControlType()
Gets the SAL window type of this control.
Returns: SalNumber. The SAL Sys.TYPE_* code for the translated control.
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.
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(nTypeMask)
Finds the first child matching a SAL window-type mask.
| Parameter | Type | Description |
|---|---|---|
| nTypeMask | SalNumber | The 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.
GetFont(sName, nSize, nEnhancement)
Reads the control font's family, point size, and style flags.
| Parameter | Type | Description |
|---|---|---|
| sName | SalString | Receives the font family name. |
| nSize | SalNumber | Receives the size in points. |
| nEnhancement | SalNumber | Receives the combined Sys.FONT_Enh* style flags. |
Returns: SalBoolean. True if a font was available; otherwise, false.
GetFormat(sPicture)
Copies the current display picture.
| Parameter | Type | Description |
|---|---|---|
| sPicture | SalString | Receives the picture, including an empty picture; remains unchanged for an unsupported target. |
Returns: SalBoolean. True when the picture is available; otherwise, false.
GetFormat()
Gets the current display picture.
Returns: SalString. The picture, or a null string for an unsupported target.
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.
GetFormattedText(sText, bFormat)
Copies the field value as formatted or unformatted text.
| Parameter | Type | Description |
|---|---|---|
| sText | SalString | Receives the text when the target supports editing. |
| bFormat | SalBoolean | True 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.
GetFormattedText(bFormat)
Gets the field value as formatted or unformatted text.
| Parameter | Type | Description |
|---|---|---|
| bFormat | SalBoolean | True 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.
GetInputMask(sMask)
Copies the input mask when a nonempty mask is configured.
| Parameter | Type | Description |
|---|---|---|
| sMask | SalString | Receives the mask on success; remains unchanged otherwise. |
Returns: SalBoolean. True for a nonempty mask; otherwise, false.
GetInputMask()
Gets the input mask used by the field.
Returns: SalString. The configured mask, or a null string for an unsupported target.
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.
GetListItemsCount()
Counts the entries in the list.
Returns: SalNumber. The item count, or Sys.LB_Err for an unsupported target.
GetListItemState(nIndex)
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber |
Returns: SalBoolean.
Applies the referenced SAL operation to this control.
GetListItemText(nIndex, sText)
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | |
| sText | SalString |
Returns: SalNumber.
Applies the referenced SAL operation to this control.
GetListItemText(nIndex)
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber |
Returns: SalString.
Applies the referenced SAL operation to this control.
GetListItemTextLength(nIndex)
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber |
Returns: SalNumber.
Applies the referenced SAL operation to this control.
GetListSelectedFile(sFileName)
| Parameter | Type | Description |
|---|---|---|
| sFileName | SalString |
Returns: SalBoolean.
Applies the referenced SAL operation to this control.
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.
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.
GetListSelectedItems(nSelectedArray)
Replaces an array with the selected indices of a multi-selection list.
| Parameter | Type | Description |
|---|---|---|
| nSelectedArray | SalArray<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.
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.
GetLocation(nX, nY)
Reads this control's location in form units.
| Parameter | Type | Description |
|---|---|---|
| nX | SalNumber | Receives the horizontal location. |
| nY | SalNumber | Receives the vertical location. |
Returns: SalBoolean. Always true; an unresolved control produces zero coordinates.
GetName(sText)
Copies this control's name to the supplied variable.
| Parameter | Type | Description |
|---|---|---|
| sText | SalString | Receives the control name when the operation succeeds. |
Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
GetName()
Gets this control's name.
Returns: SalString. The control name, or an empty string if the control cannot be resolved.
GetNextChild(nTypeMask)
Finds the next sibling matching a SAL window-type mask.
| Parameter | Type | Description |
|---|---|---|
| nTypeMask | SalNumber | The SAL window types to include; zero matches no controls. |
Returns: SalWindowHandle. The next matching control handle, or a null SAL handle when none matches.
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.
GetProperty(sName, sValue)
Reads a SAL named property into a supplied variable.
| Parameter | Type | Description |
|---|---|---|
| sName | SalString | The property name. |
| sValue | SalString | Receives the value only when the property is found. |
Returns: SalBoolean. True if a non-null property value was found; otherwise, false.
GetProperty(sName)
Gets the value of a SAL named property.
| Parameter | Type | Description |
|---|---|---|
| sName | SalString | The property name. |
Returns: SalString. The property value, or a SAL null string if the value is unavailable.
GetSize(nWidth, nHeight)
Reads this control's size in form units.
| Parameter | Type | Description |
|---|---|---|
| nWidth | SalNumber | Receives the width. |
| nHeight | SalNumber | Receives the height. |
Returns: SalBoolean. Always true; an unresolved control produces a zero size.
GetText(sText, nMaxLen)
Copies this control's displayed text or long-string value to a SAL string.
| Parameter | Type | Description |
|---|---|---|
| sText | SalString | Receives the retrieved text. |
| nMaxLen | SalNumber | The 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.
GetText(nMaxLen)
Gets this control's displayed text or long-string value.
| Parameter | Type | Description |
|---|---|---|
| nMaxLen | SalNumber | The 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.
GetTextUnmasked(sText)
Copies text with removable input-mask characters stripped.
| Parameter | Type | Description |
|---|---|---|
| sText | SalString | Receives the unmasked text. |
Returns: SalBoolean. True when the translated target exists; otherwise, false.
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.
GetWindowColor(nColorIndex)
Reads a window or cell color as a Win32 color value.
| Parameter | Type | Description |
|---|---|---|
| nColorIndex | SalNumber | The Sys.COLOR_Index* color component to read. |
Returns: SalNumber. The color encoded as a Win32 color value, or zero if the control is unavailable.
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.
InsertListItem(nIndex, sAdd)
Inserts text into the list at a requested position.
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | The zero-based insertion index, or -1 to append using normal sorting behavior. |
| sAdd | SalString | The item text. |
Returns: SalNumber. The resulting index, or Sys.LB_Err for an invalid index or unsupported target.
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(tClass)
Tests this control's runtime type against an application base type.
| Parameter | Type | Description |
|---|---|---|
| tClass | Type | The type to test, including the framework's emulated inheritance relationships. |
Returns: SalBoolean. True if the runtime type derives from the requested type; otherwise, false.
IsEmpty()
Checks whether the unmasked text is null or empty.
Returns: SalBoolean. True for empty edit text; otherwise, false.
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.
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.
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.
IsValidDecimal(nPrecision, nScale)
Checks the displayed text as a decimal with the specified digit limits, picture, and culture.
| Parameter | Type | Description |
|---|---|---|
| nPrecision | SalNumber | The maximum total number of digits. |
| nScale | SalNumber | The maximum number of fractional digits. |
Returns: SalBoolean. True when the value meets the decimal constraints; otherwise, false.
IsValidInteger()
Checks the displayed text as an integer using the current picture.
Returns: SalBoolean. True when the value is a valid integer; otherwise, false.
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.
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.
KillTimer(nIDEvent)
Stops an existing timer owned by this control.
| Parameter | Type | Description |
|---|---|---|
| nIDEvent | SalNumber | The 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.
MaskText(text)
Applies the current masked-text provider to an input string.
| Parameter | Type | Description |
|---|---|---|
| text | String | The text to insert into the mask. |
Returns: String. The masked text, or the original text when no applicable masked grid column exists.
For IncludeLiterals masks that are not full, trailing literals beyond the last assigned character are removed.
MoveWindow(nXOffset, nYOffset)
Moves this control by an offset expressed in form units.
| Parameter | Type | Description |
|---|---|---|
| nXOffset | SalNumber | The horizontal offset to add to the current position. |
| nYOffset | SalNumber | The vertical offset to add to the current position. |
Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
OnCreateControl()
Completes cell-template initialization for the attached main and split columns.
OnEnabledChanged(e)
Synchronizes COL_Editable and ends editing when the active column becomes disabled.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The enabled-state event data. |
OnPaddingChanged(e)
Copies the column’s padding to both grid-column default styles.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The padding-change event data. |
OnParentChanged(e)
Resolves the owning table from the new parent before raising the parent-change event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnResize(e)
Copies the stored control width to the main and split grid columns.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The resize event data. |
OnTextChanged(e)
Invokes the column’s TextChanged handlers without marking the proxy dirty.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The text-change event data. |
PixelsToFormUnits(nNumPixels, bVertical)
Converts a pixel length to form units using this control's form metrics.
| Parameter | Type | Description |
|---|---|---|
| nNumPixels | SalNumber | The pixel length to convert. |
| bVertical | SalBoolean | True for a vertical measurement; false for a horizontal measurement. |
Returns: SalNumber. The converted length in form units.
PopulateList(hSql, sSelect)
Replaces list items with tab-separated rows from a SQL result and calculates column tab stops.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | The connected SQL handle used to execute and fetch results. |
| sSelect | SalString | The 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.
PopulateList(hSql, sSelect, errorHandler)
Loads SQL result rows into the list within a temporary SQL error-handler context.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | The SQL handle used to execute and fetch results. |
| sSelect | SalString | The statement to prepare, or an empty value to reuse the prepared statement. |
| errorHandler | WhenSqlErrorHandler | The SQL error callback active during population. |
Returns: SalBoolean. True after loading the result; false for an unsupported target or failed preparation or execution.
PopulateListFiles(ctrlPath, sPathName, nAttributes)
| Parameter | Type | Description |
|---|---|---|
| ctrlPath | Control | |
| sPathName | SalString | |
| nAttributes | SalNumber |
Returns: SalBoolean.
Applies the referenced SAL operation to this control.
PostMessage(nMsg, nMywParam, nMylParam)
Posts a native Windows message to this control for asynchronous processing.
| Parameter | Type | Description |
|---|---|---|
| nMsg | SalNumber | The Windows or SAL message code. |
| nMywParam | SalNumber | The first message parameter. |
| nMylParam | SalNumber | The second message parameter. |
Returns: SalBoolean. True if the native message was posted; false for an unavailable or disposed control, or if posting fails.
QueryCheckBoxColumn(flags, checkedValue, uncheckedValue)
Retrieves the value mapping of a check-box column.
| Parameter | Type | Description |
|---|---|---|
| flags | SalNumber | Receives Sys.COL_CheckBox_IgnoreCase when enabled, or zero. |
| checkedValue | SalString | Receives the checked value. |
| uncheckedValue | SalString | Receives the unchecked value. |
Returns: SalBoolean. True for a check-box column; otherwise false without changing the outputs.
QueryDropDownListColumn(flags, lines)
Retrieves the combo-box column’s sorting and input-style flags.
| Parameter | Type | Description |
|---|---|---|
| flags | SalNumber | Receives the supported COL_DropDownList_* flags on success. |
| lines | SalNumber | Not modified by this implementation. |
Returns: SalBoolean. True for a combo-box column; false for another cell type.
QueryPopupEditColumn(flags, lines)
Retrieves the popup editor configuration.
| Parameter | Type | Description |
|---|---|---|
| flags | SalNumber | Receives zero on success. |
| lines | SalNumber | Receives the configured popup line count. |
Returns: SalBoolean. True for a popup-edit column; otherwise false without changing the outputs.
SendMessage(nMsg, nMywParam, nMylParam)
Sends a native Windows message to this control synchronously.
| Parameter | Type | Description |
|---|---|---|
| nMsg | SalNumber | The Windows or SAL message code. |
| nMywParam | SalNumber | The first message parameter. |
| nMylParam | SalNumber | The second message parameter. |
Returns: SalNumber. The native message result, or zero when the control is unavailable or disposed.
SendMessageToChildren(nMsg, nMywParam, nMylParam)
Sends a message to this control's child windows and eligible descendants.
| Parameter | Type | Description |
|---|---|---|
| nMsg | SalNumber | The Windows or SAL message code. |
| nMywParam | SalNumber | The first message parameter. |
| nMylParam | SalNumber | The 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.
SetBoundsCore(x, y, width, height, specified)
Applies designer bounds, or constrains the runtime control to zero location and height while retaining its width.
| Parameter | Type | Description |
|---|---|---|
| x | Int32 | The requested horizontal position. |
| y | Int32 | The requested vertical position. |
| width | Int32 | The requested width. |
| height | Int32 | The requested height. |
| specified | BoundsSpecified | The bounds components being changed. |
SetCellTextColor(color, discardable)
Sets the text color of this column in the current context row.
| Parameter | Type | Description |
|---|---|---|
| color | SalNumber | The SAL color value. |
| discardable | SalBoolean | Retained for compatibility; ignored. |
Returns: SalBoolean. The result of applying the cell-text color.
SetCellTextColor(color)
Sets the text color of this column in the current context row.
| Parameter | Type | Description |
|---|---|---|
| color | SalNumber | The SAL color value. |
Returns: SalBoolean. The result of applying the cell-text color.
SetColumnFlags(flags, set)
Sets or clears the specified column configuration flags.
| Parameter | Type | Description |
|---|---|---|
| flags | SalNumber | The Sys.COL_* flags to change. |
| set | SalBoolean | True to set the flags; false to clear them. |
Returns: SalBoolean. True after applying the flags.
SetColumnPosition(position)
Moves the column to a one-based display position unless either position is within the locked columns.
| Parameter | Type | Description |
|---|---|---|
| position | SalNumber | The requested display position. |
Returns: SalBoolean. False when the column or destination is locked; otherwise, true after assigning Position.
SetColumnTitle(title)
Changes the column-header text.
| Parameter | Type | Description |
|---|---|---|
| title | SalString | The new title. |
Returns: SalBoolean. True after assigning the title.
SetColumnWidth(width)
Sets the column width after converting horizontal form units to pixels.
| Parameter | Type | Description |
|---|---|---|
| width | SalNumber | The requested width in form units. |
Returns: SalBoolean. True after assigning the width.
SetContextMenu(sMenuName, nFlags)
Creates and assigns a context menu for this control.
| Parameter | Type | Description |
|---|---|---|
| sMenuName | SalString | The menu type name to resolve. |
| nFlags | SalNumber | Use 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.
SetContextMenu(menuType, nFlags)
Creates and assigns a context menu for this control.
| Parameter | Type | Description |
|---|---|---|
| menuType | Type | The type of the menu to create. |
| 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.
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.
SetDataLength(length)
Sets the maximum input length.
| Parameter | Type | Description |
|---|---|---|
| length | SalNumber | The character limit, or -1 to select the native unlimited setting. |
Returns: SalBoolean. True when the target supports editing; otherwise, false.
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.
SetFont(sName, nSize, nEnhancement)
Creates and assigns a font to this control.
| Parameter | Type | Description |
|---|---|---|
| sName | SalString | The font family name. |
| nSize | SalNumber | The font size in points. |
| nEnhancement | SalNumber | The combined Sys.FONT_Enh* style flags. |
Returns: SalBoolean. True if the font was created and assigned; otherwise, false.
SetFormat(sPicture)
Assigns a display picture, translating encoded SAL numeric pictures when present.
| Parameter | Type | Description |
|---|---|---|
| sPicture | SalString | The display picture to assign. |
Returns: SalBoolean. True when the target supports formatting; this does not indicate whether its Format setter accepted the picture.
SetFormatCode(nFormat)
Applies a standard SAL picture, character casing, or password display setting.
| Parameter | Type | Description |
|---|---|---|
| nFormat | SalNumber | The Sys.FMT_Format_* setting. FMT_Format_Picture leaves the existing picture unchanged. |
Returns: SalBoolean. True when the setting is supported; otherwise, false.
SetInputMask(sMask)
Assigns the field input mask.
| Parameter | Type | Description |
|---|---|---|
| sMask | SalString | The mask to apply. |
Returns: SalBoolean. True when the target supports edit masks; 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.
SetListSelectedIndex(nIndex)
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber |
Returns: SalBoolean.
Applies the referenced SAL operation to this control.
SetListSelectedItems(nIndex, bSelect)
| Parameter | Type | Description |
|---|---|---|
| nIndex | SalNumber | |
| bSelect | SalBoolean |
Returns: SalBoolean.
Applies the referenced SAL operation to this control.
SetListSelectedText(nIndexStart, sText)
| Parameter | Type | Description |
|---|---|---|
| nIndexStart | SalNumber | |
| sText | SalString |
Returns: SalNumber.
Applies the referenced SAL operation to this control.
SetLocation(nX, nY)
Sets this control's location in form units.
| Parameter | Type | Description |
|---|---|---|
| nX | SalNumber | The new horizontal coordinate. |
| nY | SalNumber | The 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.
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(sName, sValue, nLength)
Assigns a SAL named property after limiting the value's length.
| Parameter | Type | Description |
|---|---|---|
| sName | SalString | The property name. |
| sValue | SalString | The value to assign. |
| nLength | SalNumber | The number of leading characters to retain. |
Returns: SalBoolean. True if the translated control implements the SAL window contract; otherwise, false.
SetSize(nWidth, nHeight)
Sets this control's dimensions in form units.
| Parameter | Type | Description |
|---|---|---|
| nWidth | SalNumber | The new width. |
| nHeight | SalNumber | The new height. |
Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
SetText(sText)
Assigns the control's text.
| Parameter | Type | Description |
|---|---|---|
| sText | SalString | The text to display. |
Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
SetText(sValue, bFormat)
Assigns the field value through its typed value conversion.
| Parameter | Type | Description |
|---|---|---|
| sValue | SalString | The text to assign. |
| bFormat | SalBoolean | Retained for compatibility; this argument is ignored. |
Returns: SalBoolean. True when the target supports editing; otherwise, false.
SetTimer(nIDEvent, nElapseMilliSec)
Starts or restarts a timer that sends SAL timer actions to this control.
| Parameter | Type | Description |
|---|---|---|
| nIDEvent | SalNumber | The timer identifier sent in the first parameter of each Sys.SAM_Timer action. |
| nElapseMilliSec | SalNumber | The interval between ticks, in milliseconds. |
Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
SetVisibleCore(value)
Synchronizes COL_Visible and preserves a row selection when hiding the active column.
| Parameter | Type | Description |
|---|---|---|
| value | Boolean | True to show the column; false to hide it. |
SetWindowColor(nColorIndex, nColor)
Assigns a window or table-cell color.
| Parameter | Type | Description |
|---|---|---|
| nColorIndex | SalNumber | The Sys.COLOR_Index* component to change. |
| nColor | SalNumber | The 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.
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.
Sort(flags)
Fetches all rows, ends editing, and sorts the main grid using this column’s comparer.
| Parameter | Type | Description |
|---|---|---|
| flags | ListSortDirection | The ascending or descending sort direction. |
If editing cannot end, sorting is skipped. Selection messages are suppressed while sorting, and the column’s sort glyph is updated.
Sum(flagsOn, flagsOff)
Adds this column's numeric values over rows matching the specified flags.
| Parameter | Type | Description |
|---|---|---|
| flagsOn | Int32 | Row flags for which at least one must be set, or zero to omit this test. |
| flagsOff | Int32 | Row 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.
TrackPopupMenu(sMenuName, nFlags, nX, nY, callback)
Creates and displays a popup menu, disposing it after it closes.
| Parameter | Type | Description |
|---|---|---|
| sMenuName | SalString | The name used to resolve the menu type. |
| nFlags | SalNumber | Popup flags controlling right alignment and use of the current cursor coordinates. Center alignment and context-menu flags are not supported. |
| nX | SalNumber | The horizontal screen coordinate in pixels, unless the cursor-X flag is set. |
| nY | SalNumber | The vertical screen coordinate in pixels, unless the cursor-Y flag is set. |
| callback | Action<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.
TrackPopupMenu(menuType, nFlags, nX, nY, callback)
Creates and displays a popup menu, disposing it after it closes.
| Parameter | Type | Description |
|---|---|---|
| menuType | Type | The menu type to instantiate. |
| nFlags | SalNumber | Popup flags controlling right alignment and use of the current cursor coordinates. Center alignment and context-menu flags are not supported. |
| nX | SalNumber | The horizontal screen coordinate in pixels, unless the cursor-X flag is set. |
| nY | SalNumber | The vertical screen coordinate in pixels, unless the cursor-Y flag is set. |
| callback | Action<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.
UnmaskText(text)
Removes prompt characters and mask literals using the current edit mask.
| Parameter | Type | Description |
|---|---|---|
| text | String | The masked text. |
Returns: String. The unmasked text, or the input unchanged when no edit mask is configured.
UpdateWindow()
Requests an update of this control.
Returns: SalBoolean. True if the operation is accepted by the SAL window implementation; otherwise, false.
UpdateZOrder()
Suppresses control z-order updates for the table-column proxy.
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.
Validate(nValidate)
Validates the column’s current value through the SAL window adapter.
| Parameter | Type | Description |
|---|---|---|
| nValidate | SalNumber | FMT_Validate_Dialog to enable validation feedback; another value suppresses dialog feedback. |
Returns: SalBoolean. The validation result returned by SalWindow.Validate.
Events
TextChanged
EventHandler Occurs when the column’s text value changes, without marking the column proxy dirty.
WindowActions
WindowActionsEventHandler Occurs when this control dispatches a SAL or custom window action.
Implements
| Name | Description |
|---|---|
| ISalControl | Exposes a SAL control's data type, value, and modification state. |
| ISalEditControl | Exposes validation, formatting, and input constraints for an editable SAL control. |
| ISalListControl | Provides item access, searching, and selection for SAL list controls. |
| ISalWindow | Provides SAL window actions, named properties, and access to a window's runtime implementation. |