Product: MapBasic
Version: 7.x
Platform: 98/NT 4.0 SP6/2000/XP
Category: Documentation
Summary:
Alter Cartographic Frame statement - Description.
Question:
How is the Alter Cartographic Frame statement used?
Answer:
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.)
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 which you can obtain by calling the FrontWindow() and WindowId( ) functions.
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 states the desired distance from the top of MapInfo’s workspace to the top edge of the window.
y states the desired distance from the left of MapInfo’s workspace to the left edge of the window.
paper_units is a string representing a paper unit name (e.g. "cm" for centimeters).
frame_title is a string which defines a frame title.
frame_subtitle is a string which defines a frame sub-title.
id is the position within the style list for that frame. Currently there is no MapBasic function to get information about the number of styles in a frame.
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 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). 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 Legend 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 theText of any style. There is no way to add or remove styles from any type of frame.
See Also
Window statements and functions
Last Modified:
|