Purpose
Returns information about a Browser window, such as: the total number of rows or columns in the Browser window; or the row number, column number, or value contained in the current cell. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
BrowserInfo( window_id, attribute )
window_id is an integer window identifier.
attribute is an integer code indicating what type of information to return. For values, see the table later in this description.
Return Value
Float, logical, or string depending on the attribute parameter.
Description
The BrowserInfo() function returns information about a Browser window. The function does not apply to the Redistricter window.
The window_id parameter specifies which Browser window to query. To obtain a window identifier, call the FrontWindow() function immediately after opening a window, or call the WindowID() function at any time after the window's creation.
There are several attributes that BrowserInfo() returns about any given Browser window. The attribute parameter tells the BrowserInfo () function what Browser window statistic to return. The attribute parameter should be one of the codes from the following table; codes are defined in MAPBASIC.DEF.
Attribute Parameter | ID | Return Value |
---|---|---|
BROWSER_INFO_NROWS | 1 | The total number of rows in the Browser window. |
BROWSER_INFO_NCOLS | 2 | The total number of columns in the Browser window. |
BROWSER_INFO_CURRENT_ROW | 3 | The row number of the current cell in the Browser window. Row numbers start at one (1). |
BROWSER_INFO_CURRENT_COLUMN | 4 | The column number of the current cell in the Browser window. Column numbers start at zero (0). |
BROWSER_INFO_CURRENT_CELL_VALUE | 5 | The value contained in the current cell in the Browser window. |
Error Conditions
ERR_BAD_WINDOW (590) error generated if parameter is not a valid window number.
ERR_FCN_ARG_RANGE (644) error generated if an argument is outside of the valid range.
ERR_WANT_BROWSER_WIN (312) error generated if window id is not a Browser window.
See Also: