SalTableWindow

PPJ.Runtime.Windows.SalTableWindow

Namespace: PPJ.Runtime.Windows

Assembly: PPJ.Runtime.49 (4.9.0.0)

Table Window Control

public class SalTableWindow : SalTableWindowBase, ISalWindow, ISalControl, IEnumerable<SalTableRow>, IEnumerable

Constructors

SalTableWindow()

Constructs a SalTableWindow control.

Properties

AllowAutoEditing

Boolean: Enables/Disables AutoEditing mode. When this mode is on, the grid automatically enters edit mode when a cell is selected. (Default: False)

AllowFiltering

Boolean: Enables/Disables the excel-style filtering feature. (Default: False)

Set the property UseNativeTypes to true to be able to use the type-specific filters, otherwise the filters operate on the displayed value. When using native types in conjunction with a non-standard format or an edit mask that cannot be parsed to a native value, it is possible to lose the edited value when it cannot be parsed.

AllowRowSizing

Boolean: Allow row sizing. (Default: False)

BackgroundFillInterval

Int32: Fill interval for the background filler, in milliseconds.

BackgroundFillRows

Int32: Number of rows to load on each interval

CellContextMenu

ContextMenu: Returns/Sets the context menu to use with the cell editor control. (Default: null)

CellContextMenuStrip

ContextMenuStrip: Returns/Sets the context menu to use with the cell editor control. (Default: null)

CultureInfo

CultureInfo: Returns/Sets the culture to use for this control. (Default: null)

DefaultFocusRowStyle

FocusRowStyle: Default value for the FocusRowStyle property.

GetMergedRangeHandler

GetMergedRangeDelegate: GetMergedRange

IsEmbedded

Boolean: Returns true if the SalTableWindow control is embedded and the columns are owned/parented by the container.

Item(id)

SalTableColumn: Returns the table column object with the specified column ID. The ID is 1-based.

Item(name)

SalTableColumn: Returns the table column object with the specified name.

Label

Control: Returns/Sets the label associated with this control.

LinesPerRow

Int32: Number of lines per row. (Default: 1)

Modified

Boolean: is modified

NamedProperties

SalNamedProperties: Returns the collection of named properties.

ReadOnly

Boolean: Returns/Sets the ReadOnly flag. When the ReadOnly flag is true the entire TableWindow control cannot be edited. However, the Mouse, scrolling and the Keyboard are still active. (Default: False)

RowSizingStyle

RowsSizingStyle: Keeps all rows of the same height. (Default: FreeSize)

UseNativeTypes

Boolean: Returns or sets whether the grid tries to parse the edited value into the native type of the column. (Default: False)

When using native types in conjunction with a non-standard format or an edit mask that cannot be parsed to a native value, it is possible to lose the edited value when it cannot be parsed.

VirtualMode

Boolean: Enables or disables virtual mode. When virtual mode is on, the rows are fetched from the data source as they are scrolled into view. (Default: False)

Methods

AnyRows(flagsOn, flagsOff)

Determines whether any rows in the specified table window match certain flags. If you set flagsOn to zero (0) and flagsOff to zero (0), SalTblAnyRows returns TRUE if the table window contains any rows at all, regardless of their flags.

Parameter
Type
Description

flagsOn

The flags that the row should have. You can combine ROW * flags using the OR (|) operator.

flagsOff

The flags that the row should not have. You can combine ROW * flags using the OR (|) operator.

Returns: SalBoolean. true if any

AutoSizeCols(colStart, colEnd, extraSpace)

Autosizes the specified column.

Parameter
Type
Description

colStart

colEnd

extraSpace

BringWindowToTop()

Brings a window to the top of all overlapping windows.

Returns: SalBoolean.

CenterWindow()

Centers a window. If the window is a top-level window, it centers it on the desktop. If the window is a child window, it centers it on top of its parent.

Returns: SalBoolean.

ClearCursor(type)

Clears a window's cursor.

Parameter
Type
Description

Returns: SalBoolean.

ClearSelection()

Deselects all rows of a table window.

Returns: SalBoolean.

ColumnAverage(columnId, flagsOn, flagsOff)

Computes the average of all column values or only specified column values in a table window.

Parameter
Type
Description

columnId

flagsOn

flagsOff

Returns: SalNumber.

ColumnSum(columnId, flagsOn, flagsOff)

Computes the sum of all column values or only specified column values in a table window.

Parameter
Type
Description

columnId

flagsOn

flagsOff

Returns: SalNumber.

CopyRows(flagsOn, flagsOff)

Copies the contents of the specified table window rows to the Clipboard in text format. In the Clipboard, columns are delimited by TAB characters and rows are delimited by end-of-line characters. Set flagsOn to zero (0) and flagsOff to zero (0) to copy the entire table.

Parameter
Type
Description

flagsOn

The flags that the row should have. You can combine ROW* flags using the OR (|) operator. NflagsOff Number. The flags that the row should not have. You can combine ROW* flags using the OR (|) operator.

flagsOff

The flags that the row should have. You can combine ROW* flags using the OR (|) operator.

Returns: SalBoolean. bool

CreateColumn(colPos, dispWidth, maxChars, title)

Creates a table window column of string data type at runtime. When you return to design mode, destroys the column.

Parameter
Type
Description

colPos

The Column Position

dispWidth

The display width of the column in pixels.

maxChars

The maximum number of characters that the column can contain.

title

The column title.

Returns: SalNumber. Column ID

CreateColumn(colPos, dispWidth, maxChars, title, dataType)

Creates a table window column of string data type at runtime. When you return to design mode, destroys the column.

Parameter
Type
Description

colPos

The Column Position

dispWidth

The display width of the column in pixels.

maxChars

The maximum number of characters that the column can contain.

title

The column title.

dataType

The SAL data type constant.

Returns: SalNumber. Column ID

CreateColumnEx(colPos, dispWidth, title, maxChars, dataType)

Creates a table window column using a given data type at runtime. Allowed types are DT_String, DT_Number and DT_DateTime

Parameter
Type
Description

colPos

dispWidth

maxChars

dataType

Returns: SalNumber. Column ID

CreateColumnFromClass(className, position)

Uses the specified class as a template to create a new column in a SalTableWindow.

Parameter
Type
Description

className

The name of the column class to be used as a template.

position

The position in the grid or table where the new column where be inserted. 1 is the left-most position. -1 indicates to append the column to the end of the table.

Returns: SalTableColumn.

DefineRowHeader(title, width, flags, column)

Defines the appearance and behavior of a table window's row header. The row header is a non-editable area on the left edge of a table window that displays information that stays displayed even when a user scrolls horizontally. A typical use of a row header is the display of row numbers.

Parameter
Type
Description

title

The title of the row header column.

width

The width of the row header in pixels.

flags

The row header attributes.

column

The column that the row header mirrors. Whatever displays in the row header. If colId is 0, the row header is blank.

Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.

DefineSplitWindow(rows, resizable)

Splits a table window horizontally.

Parameter
Type
Description

resizable

Returns: SalBoolean.

DeleteRow(rowNum, flag)

Deletes a row from a table window but not from the database.

Parameter
Type
Description

rowNum

The number of the row to delete.

flag

A constant used to coordinate a delete from the table window with a with a delete from a database result set. This parameter can be one of these values: TBL_Adjust, TBL_NoAdjust

Returns: SalBoolean. bool

DeleteSelected(hSql)

Applies a SQL DELETE statement to all table window rows with the ROW Selected flag.

Parameter
Type
Description

hSql

Sql handle with the prepared DELETE statement

Returns: SalBoolean. bool

DeleteSelected(hSql, errorHandler)

Applies a SQL DELETE statement to all table window rows with the ROW Selected flag.

Parameter
Type
Description

hSql

Sql handle with the prepared DELETE statement

Returns: SalBoolean. bool

DestroyColumns()

Destroys all automatic columns created by SalTblCreateColumn or SalTblPopulate at runtime. This function only works on table windows that contain only automatic columns.

Returns: SalBoolean.

DestroyWindow()

Destroys a form window, a top-level table window, or a modeless dialog box created with SalCreateWindow.

Returns: SalBoolean.

DisableWindow()

Disables keyboard and mouse input to a window. If the window contains text (for example, a push button), the text is grayed. If the window is a data field, it cannot receive the focus.

Returns: SalBoolean.

DisableWindowAndLabel()

Disables keyboard and mouse input to a window and grays out its associated label. A label is the label control that immediately precedes the window in the outline. The label control must have a mnemonic. If the window contains text (for example, a push button), the text is grayed. If the window is a data field, it cannot receive the focus.

Returns: SalBoolean.

DoDeletes(hSql, flagsOn)

Applies a SQL DELETE statement to all table window rows that have nFlagsOn flags.

Parameter
Type
Description

hSql

Sql handle with the prepared DELETE statement

flagsOn

uses row flags to determine which rows to delete. You can specify either of these flags: ROW Mark Deleted ROW Selected

Returns: SalBoolean. bool

DoDeletes(hSql, flagsOn, errorHandler)

Applies a SQL DELETE statement to all table window rows that have nFlagsOn flags.

Parameter
Type
Description

hSql

Sql handle with the prepared DELETE statement

flagsOn

uses row flags to determine which rows to delete. You can specify either of these flags: ROW Mark Deleted ROW Selected

Returns: SalBoolean. bool

DoInserts(hSql, clearFlags)

Applies a SQL INSERT statement to all the rows in a table window that have the ROW_New flag.

Parameter
Type
Description

hSql

Sql handle with the prepared INSERT statement

clearFlags

Whether to reset the ROW New flag. If TRUE, clears the ROW New flag of each inserted row; if FALSE, does not clear the ROW New flag of each inserted row. This is useful for error handling; if an error occurs, you can rollback the transaction and try again.

Returns: SalBoolean. bool

DoInserts(hSql, clearFlags, errorHandler)

Applies a SQL INSERT statement to all the rows in a table window that have the ROW_New flag.

Parameter
Type
Description

hSql

Sql handle with the prepared INSERT statement

clearFlags

Whether to reset the ROW New flag. If TRUE, clears the ROW New flag of each inserted row; if FALSE, does not clear the ROW New flag of each inserted row. This is useful for error handling; if an error occurs, you can rollback the transaction and try again.

Returns: SalBoolean. bool

DoUpdates(hSql, clearFlags)

Applies a SQL UPDATE statement to all table window rows with the Row_Edited flag.

Parameter
Type
Description

hSql

Sql handle with the prepared UPDATE statement

clearFlags

If TRUE, clears the Row Edited flag of each changed row; if FALSE, does not clear the Row Edited flag of each changed row. This is useful for error handling; if an error occurs, you can roll back the transaction and try again.

Returns: SalBoolean. bool

DoUpdates(hSql, clearFlags, errorHandler)

Applies a SQL UPDATE statement to all table window rows with the Row_Edited flag.

Parameter
Type
Description

hSql

Sql handle with the prepared UPDATE statement

clearFlags

If TRUE, clears the Row Edited flag of each changed row; if FALSE, does not clear the Row Edited flag of each changed row. This is useful for error handling; if an error occurs, you can roll back the transaction and try again.

Returns: SalBoolean. bool

EnableWindow()

Enables keyboard and mouse input to a window.

Returns: SalBoolean.

EnableWindowAndLabel()

Enables keyboard and mouse input to a window and enables its associated label as well. A label is the label control that immediately precedes the window in the outline.

Returns: SalBoolean.

FetchRow(rowNum)

Sends a SAM_FetchRow message to a table window if the specified row has not been already fetched.

Parameter
Type
Description

rowNum

The row number.

Returns: SalNumber. Result

FindChild(windowName)

This function finds a child window of a given name in the specified window.

Parameter
Type
Description

windowName

Returns: SalWindowHandle.

FindNextRow(rowNum, flagsOn, flagsOff)

Parameter
Type
Description

flagsOn

flagsOff

Returns: SalBoolean.

FindPrevRow(rowNum, flagsOn, flagsOff)

Parameter
Type
Description

flagsOn

flagsOff

Returns: SalBoolean.

FireWindowActions(msg, mywParam, mylParam)

Dispatches the specified message (Window Actions) directly to the control's WindowActions event handlers, without going through Windows message loop.

Parameter
Type
Description

mywParam

mylParam

Returns: SalNumber.

FireWindowActionsToChildren(nMsg, nMywParam, nMylParam)

Dispatches the specified message (Window Actions) directly to the children's WindowActions event handlers, without going through Windows message loop.

Parameter
Type
Description

nMsg

nMywParam

nMylParam

Returns: SalBoolean.

FormUnitsToPixels(formUnits, vertical)

Computes the number of pixels in the number of form units. Form units are a unit of measurement used by functions which move and position objects. Form units are computed using physical units (pixels) in conjunction with the window's font size.

Parameter
Type
Description

formUnits

The number of form units.

vertical

If the form units are on the X axis, set this parameter to FALSE. If the form units are on the Y axis, set this parameter to TRUE.

Returns: SalNumber.

FromControl(ctrl)

Casts the control to SalTableWindow. If the control is an instance of SalFormTableWindow, returns the inner table control.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: SalTableWindow.

GetClassName()

Return the name of a window's class as a string.

Returns: SalString.

GetColumnFromId(colId)

Gets the table window column control with the specified id.

Parameter
Type
Description

colId

The column identifier.

Returns: SalTableColumn. SalTableColumn

GetColumnFromPos(colPos)

Gets the table window column control at the specified position.

Parameter
Type
Description

colPos

The column position.

Returns: SalTableColumn. SalTableColumn

GetColumnText(colId, text)

Parameter
Type
Description

Returns: SalBoolean.

GetColumnText(colId)

Gets data from a column of a table window's context row.

Parameter
Type
Description

Returns: SalString.

GetColumnWindow(nCol, nFlags)

Gets the handle of a table window column.

Parameter
Type
Description

Returns: SalWindowHandle.

GetContextRow()

Returns a table window's current context row. Before sending a SAM_FetchRow message, automatically sets the context row so that assignments made while processing the message reference the correct row.

Returns: SalNumber. Context row

GetControlType()

Returns an object's type.

Returns: SalNumber.

GetFirstChild(typeMask)

Returns the handle of the first child window of the specified type. You can use this function to get the handles of MDI child windows.

Parameter
Type
Description

typeMask

One or more window types combined (using the OR (|) operator) to create a mask of child window types.

Returns: SalWindowHandle.

GetFont(name, size, enhancement)

Parameter
Type
Description

Returns: SalBoolean.

GetLabelText(sText, nMaxLength)

Parameter
Type
Description

nMaxLength

Returns: SalNumber.

GetLabelText(nMaxLength)

Retrieves the text of the label associated to a control. Important: The label control does not require a mnemonic for the functions listed above to operate.

Parameter
Type
Description

nMaxLength

Returns: SalString.

GetLinesPerRow(lines)

Parameter
Type
Description

Returns: SalBoolean.

GetLinesPerRow()

Retrieves the height of a row in lines.

Returns: SalNumber.

GetLocation(x, y)

Parameter
Type
Description

Returns: SalBoolean.

GetLockedColumns()

Retrieves the number of locked table window columns. Locked table window columns do not scroll horizontally; they are fixed to the left side of the table window. All other columns appear to scroll under the locked columns.

Returns: SalNumber. Number of locked columns

GetMergedRange(row, col, clip)

Overrides GetMergedRange to allow the SalTableWindow class to override the method.

Parameter
Type
Description

Returns: CellRange.

GetName(text)

Parameter
Type
Description

Returns: SalBoolean.

GetName()

Gets the name of an object.

Returns: SalString.

GetNextChild(typeMask)

Returns the handle of the next child window that matches a specified type.

Parameter
Type
Description

typeMask

One or more window types combined (using the OR (|) operator) to create a mask of child window types.

Returns: SalWindowHandle.

GetNextColumn(prev, forward)

Returns the next column in the columns collection in order of ID.

Parameter
Type
Description

Returns: SalTableColumn.

GetParent()

Returns the handle of an object's parent window.

Returns: SalWindowHandle.

GetProperty(name, value)

Parameter
Type
Description

Returns: SalBoolean.

GetProperty(name)

Gets the value of a named property.

Parameter
Type
Description

Returns: SalString.

GetRowFlags(rowNum, flags)

Queries a row's flags.

Parameter
Type
Description

rowNum

The row number of the row whose flags you want to test.

flags

The row flags to test for. You can combine ROW* flags using the OR (|) operator.

Returns: SalBoolean. bool

GetSize(width, height)

Parameter
Type
Description

Returns: SalBoolean.

GetTableFlags(flags)

Tests the state of a table window's flags.

Parameter
Type
Description

flags

The table flags to test. You can combine TBL * flags using the OR (|) operator.

Returns: SalBoolean. True if any of the flags indicated by nFlags are set and FALSE otherwise.

GetText(text, maxLen)

Parameter
Type
Description

Returns: SalNumber.

GetText(maxLen)

Retrieves the text of a window.

Parameter
Type
Description

maxLen

Returns: SalString.

GetWindowColor(colorIndex)

Gets a window's color.

Parameter
Type
Description

colorIndex

Returns: SalNumber.

GetWindowState()

Returns a window's current state.

Returns: SalNumber.

HideWindow()

Hides a window.

Returns: SalBoolean.

HideWindowAndLabel()

Hides a window and its associated label.

Returns: SalBoolean.

HitTest(x, y, row, col, location)

Parameter
Type
Description

Returns: SalBoolean.

InsertRow(rowNum)

Inserts a new blank row into a table window.

Parameter
Type
Description

rowNum

The row number of the new row.

Returns: SalNumber. New row number

InvalidateWindow()

Causes a window to be repainted.

Returns: SalBoolean.

IsDerivedFromClass(typeClass)

Determines whether a window is an instance of the specified class.

Parameter
Type
Description

typeClass

Returns: SalBoolean.

IsEnabled()

Determines whether a window is enabled for mouse and keyboard input.

Returns: SalBoolean.

IsVisible()

Determines whether a window is currently visible.

Returns: SalBoolean.

KillCellEdit()

Ends edit mode in the current cell.

Returns: SalBoolean.

KillFocusRow()

Turns off the table window's focus frame.

Returns: SalBoolean.

KillTimer(idEvent)

Destroys an object's system timer.

Parameter
Type
Description

idEvent

Returns: SalBoolean.

MoveWindow(xOffset, yOffset)

Moves a window a given number of form units on the X and Y axes relative to its current position.

Parameter
Type
Description

xOffset

yOffset

Returns: SalBoolean.

PasteRows()

Pastes the contents of the Clipboard to the specified table window. Assumes the Clipboard data is in text format with cells delimited by tab characters and rows delimited by end-of-line characters. Inserts the new rows into the table window without overwriting existing rows, and converts the data to the data types of the corresponding table window columns.

Returns: SalBoolean. bool

PixelsToFormUnits(numPixels, vertical)

Computes the number of form units based on the number of pixels. Form units are a unit of measurement used by functions that move and position objects. Form units are computed using physical units (pixels) in conjunction with a window's font sizes.

Parameter
Type
Description

numPixels

vertical

If the form units are on the X axis, set this parameter to FALSE. If the form units are on the Y axis, set this parameter to TRUE.

Returns: SalNumber.

Populate(hSql, select, method)

Populates the table window with the result of the select.

Parameter
Type
Description

Returns: SalBoolean.

Populate(hSql, select, method, errorHandler)

Populates the table window with the result of the select.

Parameter
Type
Description

Returns: SalBoolean.

PopulateFromXML(file, rootNode, tableNode, useSchema)

Clears a table window or grid and then fills new rows with data from an XML document. Optionally uses an XML schema to set attributes in the table.

Parameter
Type
Description

file

The name of the XML document file containing data to be used to populate the table.

rootNode

The name of the XML root node of the table, or the name of the XML node pertaining to a table row. See tableNode .

tableNode

If true, it means that the name specified in rootNode is the actual root node of the table, and this function should use the default name "row" as the name of the node for each table row. If false, it means that the name in rootNode is actually the name of a row node, and each node found with that name should be processed as a table window or grid row.

useSchema

Indicates whether to retrieve and use an XML schema for determining data types and attributes. If true, the schema is retrieved. If false, data is written into table window cells with the presumption that the table structure is already correct. Currently, useSchema cannot be specified true when tableNode is false.

Returns: SalBoolean. True if the function succeeds and FALSE if fails. Some failure conditions, such as an invalid file name or invalid root node name, may cause error message dialogs to be displayed.

After each row of data is populated, this function sends message SAM_XMLRowDone to the table window. If an error occurs during the read, then the data in the table may be incomplete and should not be relied upon. When useSchema is set to true, and if the table window's columns were created at design time, the length of each column's value will be the length assigned at design time. If the table window or grid has no design-time columns and they are being automatically created during the call to this function, then the length of each column's value will be the length that is specified in the XML schema. This raises the possibility of truncation, if the value of an element contains more characters than are specified by the design-time length or the XML schema length.

PostMessage(msg, mywParam, mylParam)

Posts the specified message to a window by adding nMsg to hWndReceiver's message queue.

Parameter
Type
Description

mywParam

mylParam

Returns: SalBoolean.

QueryFocusCell(rowNum, column)

Parameter
Type
Description

Returns: SalBoolean.

QueryRowHeader(title, maxTitle, width, flags, column)

Parameter
Type
Description

Returns: SalBoolean.

QueryScroll(position, minRange, maxRange)

Parameter
Type
Description

position

minRange

maxRange

Returns: SalBoolean.

QuerySplitWindow(rows, resizable)

Parameter
Type
Description

Returns: SalBoolean.

QueryVisibleRange(minRange, maxRange)

Parameter
Type
Description

minRange

maxRange

Returns: SalBoolean.

ResetTable()

Clears a table window by discarding all rows from the table window cache and setting the table range to 0, -1.

Returns: SalBoolean.

ScrollRow(rowNum, column)

Scrolls a table window to the specified row and column.

Parameter
Type
Description

rowNum

The number of the row to scroll to. If you specify -1, only the column scrolls into view.

column

The table window column to scroll into view. If you specify 0, only the row scrolls into view.

Returns: SalBoolean.

ScrollRow(rowNum, column, flags)

Scrolls a table window to the specified row and column.

Parameter
Type
Description

rowNum

The number of the row to scroll to. If you specify -1, only the column scrolls into view.

column

The table window column to scroll into view. If you specify 0, only the row scrolls into view.

flags

The position of the scroll row. Specify one of these: TBL_AutoScroll, TBL_ScrollBottom, TBL_ScrollTop.

Returns: SalBoolean.

SendMessage(msg, mywParam, mylParam)

Sends the specified message to a window. SalSendMsg does not return until the processing for the message is complete.

Parameter
Type
Description

mywParam

mylParam

Returns: SalNumber.

SendMessageToChildren(msg, mywParam, mylParam)

Sends a message to all child items of a form window, dialog box, table window, or MDI window.

Parameter
Type
Description

mywParam

mylParam

Returns: SalBoolean.

SetColumnText(columnId, text)

Assigns data to a column of a table window's context row.

Parameter
Type
Description

columnId

Returns: SalBoolean.

SetContextMenu(sMenuName, nFlags)

Defines a named popup menu that displays automatically when a window receives SAM_ContextMenu.

Parameter
Type
Description

sMenuName

nFlags

Returns: SalBoolean.

SetContextMenu(menuType, flags)

Defines a named popup menu that displays automatically when a window receives SAM_ContextMenu.

Parameter
Type
Description

menuType

Returns: SalBoolean.

SetContextRow(rowNum)

Sets a table window's context row. Setting the context row does not send a SAM_FetchRow message. If the row is not currently in memory, creates a new row in memory and sets its cell values to null.

Parameter
Type
Description

rowNum

The row number of the new context row.

Returns: SalBoolean. bool

SetCursor(resource, type)

Sets a window's cursor.

Parameter
Type
Description

Returns: SalBoolean.

SetCursor(resourceId, type)

Sets a window's cursor.

Parameter
Type
Description

resourceId

Returns: SalBoolean.

SetCursor(blob, type)

Sets a window's cursor from a string variable.

Parameter
Type
Description

Returns: SalBoolean.

SetCursorFile(file, type)

Sets an application-defined cursor for the specified window. Use this function to set the cursor from an image stored in a file.

Parameter
Type
Description

Returns: SalBoolean.

SetFlagsAnyRows(flags, on, flagsOn, flagsOff)

Sets or clears row flags.

Parameter
Type
Description

flags

The flags to change. You can combine flag values using the OR (|) operator.

on

Whether to set (TRUE) or clear (false) the specified flags.

flagsOn

The flags that the rows should have. You can combine flag values using the OR (|) operator. Set flagsOn to zero (0) and flagsOff to zero (0) to specify all rows.

flagsOff

The flags that the rows should not have. You can combine flag values using the OR (|) operator. Set flagsOn to zero (0) and flagsOff to zero (0) to specify all rows.

Returns: SalBoolean. bool

SetFocus()

Sets the focus to a specified window.

Returns: SalWindowHandle.

SetFocusCell(rowNum, column, editMin, editMax)

Sets the focus to the specified table window cell (row and column). Puts the table window into edit mode and lets the user select a portion of the data in the cell.

Parameter
Type
Description

rowNum

The row that receives the edit focus.

column

The handle (or name) of the column that receives the edit focus.

editMin

The position of the left-most character. When used with nEditMax, this parameter lets the user select a portion of the cell text. nEditMin must be less than or equal to nEditMax. To select all the characters in a cell, specify zero (0) for this parameter and -1 for nEditMax.

editMax

The position of the right-most character. When used with nEditMin, this parameter lets the user select a portion of the cell text. nEditMax must be greater than or equal to nEditMin. To select all the characters in a cell, specify -1 for this parameter and zero (0) for nEditMin.

Returns: SalBoolean.

SetFocusRow(rowNum)

Sets a table window's focus frame row.

Parameter
Type
Description

rowNum

The row number of the row to which to apply the focus frame.

Returns: SalBoolean. bool

SetFont(name, size, enhancement)

Sets a window's font, font size, and font enhancements.

Parameter
Type
Description

enhancement

Returns: SalBoolean.

SetLabelText(sText)

Sets the text of the associated label control.

Parameter
Type
Description

Returns: SalBoolean.

SetLinesPerRow(nLines)

Sets the height of a row in lines.

Parameter
Type
Description

nLines

Returns: SalBoolean.

SetLocation(x, y)

Moves a window to a new position (x, y) on the X and Y axes.

Parameter
Type
Description

Returns: SalBoolean.

SetLockedColumns(locked)

Sets the number of locked columns.

Parameter
Type
Description

locked

Returns: SalBoolean. bool

SetProperty(name, value, length)

Sets the value of a named property.

Parameter
Type
Description

Returns: SalBoolean.

SetRange(min, max)

Defines the minimum and maximum rows (range) of a table.

Parameter
Type
Description

min

The lower boundary of the table window.

max

The upper boundary of the table window. Setting nMin and nMax: nMin must be less than or equal to nMax. You can specify an empty table with the range 0, -1. You can specify a dynamic range with the values zero (0) TBLMaxRow , . determines the higher boundary when the application returns TBL_NoMoreRows from a SAM_FetchRow message, or from the return of the SAM_FetchDone message.

Returns: SalBoolean. bool

SetRow(rowPos)

Sets the focus to the first, last, next, or previous row in a table window.

Parameter
Type
Description

rowPos

The position of the focus row. Specify one of these values: TBL_SetFirstRow TBL_SetLastRow BL_SetNextRow TBL_SetPrevRow

Returns: SalNumber. rowNum

SetRowFlags(rowNum, flags, on)

Sets or clears a table window row's flags.

Parameter
Type
Description

rowNum

The row number of the row whose flags you want to set or clear.

flags

The row flags. You can combine any of the ROW* flags using the OR (|) operator.

on

Whether to set (TRUE) or clear (false) the specified flags.

Returns: SalBoolean. bool

SetSize(width, height)

Resizes a window.

Parameter
Type
Description

Returns: SalBoolean.

SetTableFlags(flags, on)

Sets or clears a table window's flags.

Parameter
Type
Description

flags

The table flags. You can combine any of the TBL_* flags using the OR (|) operator.

on

Whether to set (TRUE) or clear (false) the specified flags.

Returns: SalBoolean.

SetText(text)

Sets the text of a window.

Parameter
Type
Description

Returns: SalBoolean.

SetTimer(idEvent, elapseMilliSec)

Creates a system timer for a given object. When a timer event occurs, sends SAM_Timer messages to the object in specified intervals. Timers are a limited global resource. Your application must check the value returned by SalTimerSet to verify that the timer was created.

Parameter
Type
Description

idEvent

elapseMilliSec

Returns: SalBoolean.

SetWindowColor(colorIndex, color)

Sets a window's color.

Parameter
Type
Description

colorIndex

Returns: SalBoolean.

ShowWindow()

Makes a window visible.

Returns: SalBoolean.

ShowWindowAndLabel()

Makes a window and its associated label visible. A label is the label control that immediately precedes the window in the outline.

Returns: SalBoolean.

SortRows(colId, order)

Sorts the rows of a table window based on the values in one of the table window's columns.

Parameter
Type
Description

order

TBL SortDecreasing or TBL_SortIncreasing

Returns: SalBoolean.

TrackPopupMenu(menuName, flags, x, y)

Creates pop-up menus at runtime.

Parameter
Type
Description

Returns: SalBoolean.

TrackPopupMenu(menuType, flags, x, y)

Creates pop-up menus at runtime.

Parameter
Type
Description

Returns: SalBoolean.

UpdateWindow()

Forces the update of a window.

Returns: SalBoolean.

WinHelp(file, command, numData, strData)

Starts the Windows help system.

Parameter
Type
Description

command

numData

strData

Returns: SalBoolean.

WriteXMLandSchema(path, writeTypes)

Writes the contents and properties of a table window to an XML file and/or a schema file.

Parameter
Type
Description

path

The path and name of the output file. Note that the schema file will have the same name, plus the suffix "_schema".

writeTypes

One of the XML constants(XML_DocAndSchema, XML_Document ,XML_Schema), determining whether to write XML, schema, or both.

Returns: SalBoolean. True if the function succeeds.

If the table window contains a Date/Time column, and a cell in that column is empty, then no content will be written for that particular XML document node.

WriteXMLandSchemaEx(path, writeTypes, flagsOn, flagsOff)

Writes the contents and properties of a table window to an XML file and/or a schema file.

Parameter
Type
Description

path

The path and name of the output file. Note that the schema file will have the same name, plus the suffix "_schema".

writeTypes

One of the XML constants(XML_DocAndSchema, XML_Document, XML_Schema), determining whether to write XML, schema, or both.

flagsOn

A combination of one or more of the row flags. Rows must have these flags on in order to be part of the output to XML.

flagsOff

A combination of one or more of the row flags. Rows must have these flags off in order to be part of the output to XML.

Returns: SalBoolean. True if the function succeeds.

If the table window contains a Date/Time column, and a cell in that column is empty, then no content will be written for that particular XML document node.

Yield()

Processes messages for this control.

Events

MessageActions

SalMessageHandler Message Actions

WindowActions

WindowActionsEventHandler Window Actions

Inherited By

Name
Description

Child table window with tool tip support

Implements

Name
Description

All SAL controls implement this interface.

All Sal windows (Child windows, Forms, Dialogs and MDIs) implement this interface.

Last updated