Purpose
The Alter Cartographic Frame statement changes a frame(s) position, title, subtitle, border and style of an existing cartographic legend created with the Create Cartographic Legend statement. (To change the size, position or title of the legend window, use the Set Window statement.) You can issue this statement from the MapBasic window in MapInfo Pro.
This statement cannot alter the Title, Subtitle, or Fonts for a thematic frame in the Legend window. To make these changes, use the Set Legend statement.
Syntax
Alter Cartographic Frame
[ Window legend_window_id ]
Id { frame_id }
[ Position ( x, y ) [ Units paper_units ] ]
[ Title [ frame_title ] [ Font... ] ]
[ SubTitle [ frame_subtitle ] [ Font... ] ]
[ Border Pen... ]
[ Style [ Font... ]
[ ID { id } Text { style_name } ]
[Line Pen... | Region Pen... Brush... | Symbol Symbol... ] ]
[ , ... ]
legend_window_id is an integer window identifier that you can obtain by calling the FrontWindow() function and WindowID() function.
frame_id is the ID of the frame on the legend. You cannot use a layer name. For example, three frames on a legend would have the successive ID's 1, 2, and 3.
x, y specifies the position of the upper left corner of the legend frame, in paper_units, in the Layout window.
paper_units is a string representing a paper unit name: cm (centimeters), mm (millimeters), in (inches), pt (points), and pica.
- 1 inch (in) = 2.54 centimeters , 254 millimeters, 6 picas, 72 points
- 1 point (pt) = 0.01389 inches, 0.03528 centimeters, 0.35278 millimeters, 0.08333 picas
- 1pica = 0.16667 inches, 0.42333 centimeters, 4.23333 millimeters, 12 points
- 1 centimeter (cm) = 0.39370 inches, 10 millimeters, 2.36220 picas, 28.34646 points
- 1 millimeter (mm) = 0.1 centimeters, 0.03937 inches, 0.23622 picas, 2.83465 points
frame_title is a string which defines a frame title.
frame_subtitle is a string which defines a frame subtitle.
id is the position within the style list for that frame. To get information about the number of styles in a frame, use the LegendFrameInfo() function with attribute FRAME_NUM_STYLES (13).
style_name is a string that displays next to each symbol for the frame specified in ID. The "#" character will be replaced with the layer name. The "%" character will be replaced by the text "Line", "Point, "Region", as appropriate for the symbol. For example, "% of #" will expand to "Region of States" for the frame corresponding to the STATES.TAB layer.
Description
If a Window clause is not specified MapInfo Pro will use the topmost legend window.
The Position clause controls the frame's position on the legend window. The upper left corner of the legend window has the position 0, 0. Position values use paper units settings, such as "in" (inches) or "cm" (centimeters) (see Set Paper Units statement). MapBasic has a current paper units setting, which defaults to inches; a MapBasic program can change this setting through the Set Paper Units statement. An Alter Cartographic Frame statement can override the current paper units by including the optional Units subclause within the Position clause.
The Title and SubTitle clauses accept new text, new font or both.
The Style clause must contain a list of definitions for the styles displayed in frame. You can only update the Style type for a custom style. You can update the Text of any style. There is no way to add or remove styles from any type of frame.
See Also:
Create Cartographic Legend statement, Set Cartographic Legend statement, Add Cartographic Frame statement, Remove Cartographic Frame statement