Maptitude GISDK Help

SetEditorOption()

Summary

Sets an option for an editor window.

 

Changes

Added Row Background option to and removed Code Field Callback option from version 5.0.

 

Syntax

SetEditorOption(string editor_name, string option, string value)

 

Argument Contents
editor_name The name of the editor, or null for the current editor
option The name of the option to change, as shown in the table
value The new value for the option, as shown in the table

 

Option Type Contents
Activate Macro String The name of a macro that is called whenever the window is activated
Background Menu String The context menu associated with a selected window outside the data range
Cell Menu String The context menu when a cell is selected
Close Macro String The name of a macro that is called when the user closes the window from the system menu
Column Menu String The context menu associated with a selected column
Done Macro String The name of a macro that is called after the window is closed
Font String The font in which data are displayed
Grid Boolean Whether the editor displays a grid between cells
Highlight Macro String The name of a macro that is called whenever the user changes cells that are highlighted in the editor (by clicking on a cell or dragging over a range of cells)
Locked Boolean If "True" the Close option does not appear in the system menu; if "False" the Close option does appear
Menu String The menu that is associated with the window
Position 2 integers The screen location of the window (x, y)
Range Menu String The context menu associated with a selected range of cells (but not a column or row)
Read Only Boolean Whether the data are read-only
Row Background Boolean Whether every other row in an editor window is shaded a different color ("True") or not ("False"), the default
Row Labels String Number of columns (fields) that should be locked in place at the left edge of the editor window; this option must be specified as a string (e.g., "2")
Row Menu String The context menu associated with a selected row
Selection Macro String The name of a macro that is called whenever the user clicks in a selection set column
Show Sets Boolean Whether the editor includes columns that indicate which records belong to selection sets
Size 2 integers The screen size of the window (x, y) as percentages of the frame window
Title String The title of the window
Toolbar String The toolbar that is associated with the window
Trans Head Width String The width of the head column in a transposed editor, in number of characters
Trans Data Width String The width of each data column in a transposed editor, in number of characters
Transposed Boolean Whether the editor is regular ("False") or transposed ("True")

 

Notes

Examples

// Before running the examples, open any dataview.

SetEditorOption(, "Grid", "True")

RedrawEditor()

 

// Toggle how an editor is displayed

v = GetEditorOption(, "Transposed")

v = if v then "False" else "True"

SetEditorOption(, "Transposed", v)

RedrawEditor()

 

Error Codes

Error Type Meaning
NotFound The specified editor does not exist or the specified option is not valid

 

See Also

Function Summary
CreateEditor() Creates a new editor window
GetEditorOption() Gets the value of an option from an editor window
OpenEditor() Creates an editor from a file
SetEditorOptionEx() Sets an option for an editor window

 

 

©2025 Caliper Corporation www.caliper.com