SalTableWindow
Namespace: PPJ.Runtime.Windows
Assembly: PPJ.Web.49 (4.9.0.0)
Table Window Control
- C#
- VB.NET
public class SalTableWindow : SalTableWindowBase, ISalWindow, ISalControl, IEnumerable<SalTableRow>, IEnumerable
Public Class SalTableWindow
Inherits SalTableWindowBase
Implements ISalWindow, ISalControl, IEnumerable(Of 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)
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
CultureInfo
CultureInfo: Returns/Sets the culture to use for this control.
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
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)
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 | SalNumber | The flags that the row should have. You can combine ROW * flags using the OR (|) operator. |
| flagsOff | SalNumber | The flags that the row should not have. You can combine ROW * flags using the OR (|) operator. |
Returns: SalBoolean. true if any
AutoSizeCols(extraSpace)
Resize all columns to fit the content.
| Parameter | Type | Description |
|---|---|---|
| extraSpace | Int32 | Additional space in pixels. |
AutoSizeCols(colStart, colEnd, extraSpace)
Resizes the specified columns to fit the content.
| Parameter | Type | Description |
|---|---|---|
| colStart | Int32 | First column index. |
| colEnd | Int32 | Last column index. |
| extraSpace | Int32 | Additional space in pixels. |
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(nType)
Clears a window's cursor.
| Parameter | Type | Description |
|---|---|---|
| nType | SalNumber |
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 | SalNumber | |
| flagsOn | SalNumber | |
| flagsOff | SalNumber |
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 | SalNumber | |
| flagsOn | SalNumber | |
| flagsOff | SalNumber |
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 | SalNumber | 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 | SalNumber | 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 | SalNumber | The Column Position |
| dispWidth | SalNumber | The display width of the column in pixels. |
| maxChars | SalNumber | The maximum number of characters that the column can contain. |
| title | SalString | 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 | SalNumber | The Column Position |
| dispWidth | SalNumber | The display width of the column in pixels. |
| maxChars | SalNumber | The maximum number of characters that the column can contain. |
| title | SalString | The column title. |
| dataType | 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 | SalNumber | |
| dispWidth | SalNumber | |
| title | SalString | |
| maxChars | SalNumber | |
| dataType | SalNumber |
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 | SalString | The name of the column class to be used as a template. |
| position | SalNumber | 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 | SalString | The title of the row header column. |
| width | SalNumber | The width of the row header in pixels. |
| flags | SalNumber | The row header attributes. You can combine these flags using the OR (|) operator. |
| column | Control | The column that the row header mirrors. Whatever displays in the row header. If colId is 0, the row header is blank. |
Returns: SalBoolean. bool
DefineSplitWindow(rows, resizable)
Splits a table window horizontally.
| Parameter | Type | Description |
|---|---|---|
| rows | SalNumber | |
| resizable | SalBoolean |
Returns: SalBoolean.
DeleteRow(rowNum, flag)
Deletes a row from a table window but not from the database.
| Parameter | Type | Description |
|---|---|---|
| rowNum | SalNumber | The number of the row to delete. |
| flag | SalNumber | 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 | SalSqlHandle | 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 | SalSqlHandle | Sql handle with the prepared DELETE statement |
| errorHandler | WhenSqlErrorHandler |
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 | SalSqlHandle | Sql handle with the prepared DELETE statement |
| flagsOn | SalNumber | 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 | SalSqlHandle | Sql handle with the prepared DELETE statement |
| flagsOn | Int32 | uses row flags to determine which rows to delete. You can specify either of these flags: ROW Mark Deleted ROW Selected |
| errorHandler | WhenSqlErrorHandler |
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 | SalSqlHandle | Sql handle with the prepared INSERT statement |
| clearFlags | SalBoolean | 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 | SalSqlHandle | Sql handle with the prepared INSERT statement |
| clearFlags | SalBoolean | 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. |
| errorHandler | WhenSqlErrorHandler |
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 | SalSqlHandle | Sql handle with the prepared UPDATE statement |
| clearFlags | SalBoolean | 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 | SalSqlHandle | Sql handle with the prepared UPDATE statement |
| clearFlags | SalBoolean | 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. |
| errorHandler | WhenSqlErrorHandler |
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 | SalNumber | The row number. |
Returns: SalNumber. Result
FindChild(sWindowName)
This function finds a child window of a given name in the specified window.
| Parameter | Type | Description |
|---|---|---|
| sWindowName | SalString |
Returns: SalWindowHandle.
FindNextRow(rowNum, flagsOn, flagsOff)
| Parameter | Type | Description |
|---|---|---|
| rowNum | SalNumber& | |
| flagsOn | SalNumber | |
| flagsOff | SalNumber |
Returns: SalBoolean.
FindPrevRow(rowNum, flagsOn, flagsOff)
| Parameter | Type | Description |
|---|---|---|
| rowNum | SalNumber& | |
| flagsOn | SalNumber | |
| flagsOff | SalNumber |
Returns: SalBoolean.
FormUnitsToPixels(nFormUnits, bVertical)
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 |
|---|---|---|
| nFormUnits | SalNumber | |
| bVertical | SalBoolean |
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 | Control | 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 | Int32 | The column identifier. |
Returns: SalTableColumn. SalTableColumn
GetColumnFromPos(colPos)
Gets the table window column control at the specified position.
| Parameter | Type | Description |
|---|---|---|
| colPos | Int32 | The column position. |
Returns: SalTableColumn. SalTableColumn
GetColumnText(colId, text)
| Parameter | Type | Description |
|---|---|---|
| colId | SalNumber | |
| text | SalString& |
Returns: SalBoolean.
GetColumnText(colId)
Gets data from a column of a table window's context row.
| Parameter | Type | Description |
|---|---|---|
| colId | SalNumber |
Returns: SalString.
GetColumnWindow(nCol, nFlags)
Gets the handle of a table window column.
| Parameter | Type | Description |
|---|---|---|
| nCol | SalNumber | |
| nFlags | SalNumber |
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(nTypeMask)
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 |
|---|---|---|
| nTypeMask | SalNumber |
Returns: SalWindowHandle.
GetFont(sName, nSize, nEnhancement)
| Parameter | Type | Description |
|---|---|---|
| sName | SalString& | |
| nSize | SalNumber& | |
| nEnhancement | SalNumber& |
Returns: SalBoolean.
GetLabelText(sText, nMaxLength)
| Parameter | Type | Description |
|---|---|---|
| sText | SalString& | |
| nMaxLength | SalNumber |
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 | SalNumber |
Returns: SalString.
GetLinesPerRow(lines)
| Parameter | Type | Description |
|---|---|---|
| lines | SalNumber& |
Returns: SalBoolean.
GetLinesPerRow()
Retrieves the height of a row in lines.
Returns: SalNumber.
GetLocation(nX, nY)
| Parameter | Type | Description |
|---|---|---|
| nX | SalNumber& | |
| nY | SalNumber& |
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
GetName(sText)
| Parameter | Type | Description |
|---|---|---|
| sText | SalString& |
Returns: SalBoolean.
GetName()
Gets the name of an object.
Returns: SalString.
GetNextChild(nTypeMask)
Returns the handle of the next child window that matches a specified type.
| Parameter | Type | Description |
|---|---|---|
| nTypeMask | SalNumber |
Returns: SalWindowHandle.
GetNextColumn(prev, forward)
Returns the next column in the columns collection in order of ID.
| Parameter | Type | Description |
|---|---|---|
| prev | SalTableColumn | |
| forward | Boolean |
Returns: SalTableColumn.
GetParent()
Returns the handle of an object's parent window.
Returns: SalWindowHandle.
GetProperty(sName, sValue)
| Parameter | Type | Description |
|---|---|---|
| sName | SalString | |
| sValue | SalString& |
Returns: SalBoolean.
GetProperty(sName)
Gets the value of a named property.
| Parameter | Type | Description |
|---|---|---|
| sName | SalString |
Returns: SalString.
GetRowFlags(rowNum, flags)
Queries a row's flags.
| Parameter | Type | Description |
|---|---|---|
| rowNum | SalNumber | The row number of the row whose flags you want to test. |
| flags | SalNumber | The row flags to test for. You can combine ROW* flags using the OR (|) operator. |
Returns: SalBoolean. bool
GetSize(nWidth, nHeight)
| Parameter | Type | Description |
|---|---|---|
| nWidth | SalNumber& | |
| nHeight | SalNumber& |
Returns: SalBoolean.
GetTableFlags(flags)
Tests the state of a table window's flags.
| Parameter | Type | Description |
|---|---|---|
| flags | SalNumber | 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(sText, nMaxLen)
| Parameter | Type | Description |
|---|---|---|
| sText | SalString& | |
| nMaxLen | SalNumber |
Returns: SalNumber.
GetText(nMaxLen)
Retrieves the text of a window.
| Parameter | Type | Description |
|---|---|---|
| nMaxLen | SalNumber |
Returns: SalString.
GetWindowColor(nColorIndex)
Gets a window's color.
| Parameter | Type | Description |
|---|---|---|
| nColorIndex | SalNumber |
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 |
|---|---|---|
| x | SalNumber | |
| y | SalNumber | |
| row | SalNumber& | |
| col | SalWindowHandle& | |
| location | SalNumber& |
Returns: SalBoolean.
InsertRow(rowNum)
Inserts a new blank row into a table window.
| Parameter | Type | Description |
|---|---|---|
| rowNum | SalNumber | The row number of the new row. |
Returns: SalNumber. New row number
InvalidateWindow()
Causes a window to be repainted.
Returns: SalBoolean.
IsDerivedFromClass(tClass)
Determines whether a window is an instance of the specified class.
| Parameter | Type | Description |
|---|---|---|
| tClass | Type |
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(nIDEvent)
Destroys an object's system timer.
| Parameter | Type | Description |
|---|---|---|
| nIDEvent | SalNumber |
Returns: SalBoolean.
MoveWindow(nXOffset, nYOffset)
Moves a window a given number of form units on the X and Y axes relative to its current position.
| Parameter | Type | Description |
|---|---|---|
| nXOffset | SalNumber | |
| nYOffset | SalNumber |
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(nNumPixels, bVertical)
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 |
|---|---|---|
| nNumPixels | SalNumber | |
| bVertical | SalBoolean |
Returns: SalNumber.
Populate(hSql, select, method)
Populates the table window with the result of the select.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| select | SalString | |
| method | SalNumber |
Returns: SalBoolean.
Populate(hSql, select, method, errorHandler)
Populates the table window with the result of the select.
| Parameter | Type | Description |
|---|---|---|
| hSql | SalSqlHandle | |
| select | SalString | |
| method | SalNumber | |
| errorHandler | WhenSqlErrorHandler |
Returns: SalBoolean.
PostMessage(nMsg, nMywParam, nMylParam)
Posts the specified message to a window by adding nMsg to hWndReceiver's message queue.
| Parameter | Type | Description |
|---|---|---|
| nMsg | SalNumber | |
| nMywParam | SalNumber | |
| nMylParam | SalNumber |
Returns: SalBoolean.
QueryFocusCell(rowNum, column)
| Parameter | Type | Description |
|---|---|---|
| rowNum | SalNumber& | |
| column | SalWindowHandle& |
Returns: SalBoolean.
QueryRowHeader(title, maxTitle, width, flags, column)
| Parameter | Type | Description |
|---|---|---|
| title | SalString& | |
| maxTitle | SalNumber | |
| width | SalNumber& | |
| flags | SalNumber& | |
| column | SalWindowHandle& |
Returns: SalBoolean.
QueryScroll(position, minRange, maxRange)
| Parameter | Type | Description |
|---|---|---|
| position | SalNumber& | |
| minRange | SalNumber& | |
| maxRange | SalNumber& |
Returns: SalBoolean.
QuerySplitWindow(rows, resizable)
| Parameter | Type | Description |
|---|---|---|
| rows | SalNumber& | |
| resizable | SalBoolean& |
Returns: SalBoolean.
QueryVisibleRange(minRange, maxRange)
| Parameter | Type | Description |
|---|---|---|
| minRange | SalNumber& | |
| maxRange | SalNumber& |
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 | SalNumber | The number of the row to scroll to. If you specify -1, only the column scrolls into view. |
| column | Control | 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 | SalNumber | The number of the row to scroll to. If you specify -1, only the column scrolls into view. |
| column | Control | The table window column to scroll into view. If you specify 0, only the row scrolls into view. |
| flags | SalNumber | The position of the scroll row. Specify one of these: TBL_AutoScroll, TBL_ScrollBottom, TBL_ScrollTop. |
Returns: SalBoolean.
SendMessage(nMsg, nMywParam, nMylParam)
Sends the specified message to a window. SalSendMsg does not return until the processing for the message is complete.
| Parameter | Type | Description |
|---|---|---|
| nMsg | SalNumber | |
| nMywParam | SalNumber | |
| nMylParam | SalNumber |
Returns: SalNumber.
SendMessageToChildren(nMsg, nMywParam, nMylParam)
Sends a message to all child items of a form window, dialog box, table window, or MDI window.
| Parameter | Type | Description |
|---|---|---|
| nMsg | SalNumber | |
| nMywParam | SalNumber | |
| nMylParam | SalNumber |
Returns: SalBoolean.
SetColumnText(columnId, text)
Assigns data to a column of a table window's context row.
| Parameter | Type | Description |
|---|---|---|
| columnId | SalNumber | |
| text | SalString |
Returns: SalBoolean.
SetContextMenu(sMenuName, nFlags)
Defines a named popup menu that displays automatically when a window receives SAM_ContextMenu.
| Parameter | Type | Description |
|---|---|---|
| sMenuName | SalString | |
| nFlags | SalNumber |
Returns: SalBoolean.
SetContextMenu(menuType, nFlags)
Defines a named popup menu that displays automatically when a window receives SAM_ContextMenu.
| Parameter | Type | Description |
|---|---|---|
| menuType | Type | |
| nFlags | SalNumber |
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 | SalNumber | The row number of the new context row. |
Returns: SalBoolean. bool
SetCursor(nResourceId, nType)
Sets a window's cursor.
| Parameter | Type | Description |
|---|---|---|
| nResourceId | Int32 | |
| nType | SalNumber |
Returns: SalBoolean.
SetCursor(sBlob, nType)
Sets a window's cursor from a string variable.
| Parameter | Type | Description |
|---|---|---|
| sBlob | SalString | |
| nType | SalNumber |
Returns: SalBoolean.
SetCursorFile(sFile, nType)
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 |
|---|---|---|
| sFile | SalString | |
| nType | SalNumber |
Returns: SalBoolean.
SetFlagsAnyRows(flags, on, flagsOn, flagsOff)
Sets or clears row flags.
| Parameter | Type | Description |
|---|---|---|
| flags | SalNumber | The flags to change. You can combine flag values using the OR (|) operator. |
| on | SalBoolean | Whether to set (TRUE) or clear (false) the specified flags. |
| flagsOn | SalNumber | 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 | SalNumber | 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)
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 | SalNumber | The row that receives the edit focus. |
| column | Control | The handle (or name) of the column that receives the edit focus. |
Returns: SalBoolean.
SetFocusRow(rowNum)
Sets a table window's focus frame row.
| Parameter | Type | Description |
|---|---|---|
| rowNum | SalNumber | The row number of the row to which to apply the focus frame. |
Returns: SalBoolean. bool
SetFont(sName, nSize, nEnhancement)
Sets a window's font, font size, and font enhancements.
| Parameter | Type | Description |
|---|---|---|
| sName | SalString | |
| nSize | SalNumber | |
| nEnhancement | SalNumber |
Returns: SalBoolean.
SetLabelText(sText)
Sets the text of the associated label control.
| Parameter | Type | Description |
|---|---|---|
| sText | SalString |
Returns: SalBoolean.
SetLinesPerRow(nLines)
Sets the height of a row in lines.
| Parameter | Type | Description |
|---|---|---|
| nLines | SalNumber |
Returns: SalBoolean.
SetLocation(nX, nY)
Moves a window to a new position (x, y) on the X and Y axes.
| Parameter | Type | Description |
|---|---|---|
| nX | SalNumber | |
| nY | SalNumber |
Returns: SalBoolean.
SetLockedColumns(locked)
Sets the number of locked columns.
| Parameter | Type | Description |
|---|---|---|
| locked | SalNumber | Number of locked rows. |
Returns: SalBoolean. bool
SetProperty(sName, sValue, nLength)
Sets the value of a named property.
| Parameter | Type | Description |
|---|---|---|
| sName | SalString | |
| sValue | SalString | |
| nLength | SalNumber |
Returns: SalBoolean.
SetRange(min, max)
Defines the minimum and maximum rows (range) of a table.
| Parameter | Type | Description |
|---|---|---|
| min | SalNumber | The lower boundary of the table window. |
| max | SalNumber | 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 | SalNumber | 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 | SalNumber | The row number of the row whose flags you want to set or clear. |
| flags | SalNumber | The row flags. You can combine any of the ROW* flags using the OR (|) operator. |
| on | SalBoolean | Whether to set (TRUE) or clear (false) the specified flags. |
Returns: SalBoolean. bool
SetSize(nWidth, nHeight)
Resizes a window.
| Parameter | Type | Description |
|---|---|---|
| nWidth | SalNumber | |
| nHeight | SalNumber |
Returns: SalBoolean.
SetTableFlags(flags, on)
Sets or clears a table window's flags.
| Parameter | Type | Description |
|---|---|---|
| flags | SalNumber | The table flags. You can combine any of the TBL_* flags using the OR (|) operator. |
| on | SalBoolean | Whether to set (TRUE) or clear (false) the specified flags. |
Returns: SalBoolean.
SetText(sText)
Sets the text of a window.
| Parameter | Type | Description |
|---|---|---|
| sText | SalString |
Returns: SalBoolean.
SetTimer(nIDEvent, nElapseMilliSec)
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 |
|---|---|---|
| nIDEvent | SalNumber | |
| nElapseMilliSec | SalNumber |
Returns: SalBoolean.
SetWindowColor(nColorIndex, nColor)
Sets a window's color.
| Parameter | Type | Description |
|---|---|---|
| nColorIndex | SalNumber | |
| nColor | SalNumber |
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 |
|---|---|---|
| colId | SalNumber | |
| order | SalNumber | TBL SortDecreasing or TBL_SortIncreasing |
Returns: SalBoolean.
TrackPopupMenu(sMenuName, nFlags, nX, nY, callback)
Creates pop-up menus at runtime.
| Parameter | Type | Description |
|---|---|---|
| sMenuName | SalString | |
| nFlags | SalNumber | |
| nX | SalNumber | |
| nY | SalNumber | |
| callback | Action<ContextMenu> |
Returns: SalBoolean.
TrackPopupMenu(menuType, nFlags, nX, nY, callback)
Creates pop-up menus at runtime.
| Parameter | Type | Description |
|---|---|---|
| menuType | Type | |
| nFlags | SalNumber | |
| nX | SalNumber | |
| nY | SalNumber | |
| callback | Action<ContextMenu> |
Returns: SalBoolean.
UpdateWindow()
Forces the update of a window.
Returns: SalBoolean.
Events
WindowActions
WindowActionsEventHandler
Implements
| Name | Description |
|---|---|
| ISalControl | All SAL controls implement this interface. |
| ISalWindow | All Sal windows (Child windows, Forms, Dialogs and MDIs) implement this interface. |