Default Frame Settings - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

The DEFAULT_FRAME_CLAUSES (Default Frame settings) are optional and set the defaults for legend frames. If not specified, then the default comes from the application preferences (minimum and maximum limits will exist). The default settings are used when per-frame settings are missing.

Syntax

Create Designer Legend 
	[ From Window map_window_id ]
	[ WINDOW_CLAUSES ]
	[ DEFAULT_FRAME_CLAUSES ]
	[ LEGEND_TEXT_FRAME_CLAUSE ]
	[ FRAME_FROM_LAYER_CLAUSE ]
	[ , ... ]

Where DEFAULT_FRAME_CLAUSES is:

Create Designer Legend 
	[ From Window map_window_id ]
	[ Default Frame Title { def_frame_title } [ Font... ] } ]
	[ Default Frame Subtitle { def_frame_subtitle } [ Font... ] } ]
	[ Default Frame Style { def_frame_style } [ Font... ] } ]
	[ Default Frame Line Width width [ Units paper_units ] ] 
	[ Default Frame Region Width width [ Units paper_units ] ]
	[ Default Frame Region Height height [ Units paper_units ] ]
	[ Default Frame Auto Font Size { On | Off } ]
	[ Default Frame Bar [ Thickness t_value ] [ Length l_value ]
		[ Units paper_units ] [ Horizontal | Vertical ] ]

map_window_id is an integer window identifier which you can obtain by calling the FrontWindow() function and WindowID() function. If this identifier is for a map within a Layout window, then the legends are created in the window.

def_frame_title is a string which defines a default frame title. It can include the special character #, which will be replaced by the current map layer name.

def_frame_subtitle is a string which defines a default frame subtitle. It can include the special character #, which will be replaced by the current map layer name.

def_frame_style is a string that displays next to each symbol in each frame. 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, # will expand to "Region of States" for the STATES.TAB layer.

Note: To use the # and % characters in legend row text, include the forward slash (\) escape character in front of them: \# and \%.

width value, in paper units, for the width of region sample swatches within the window.

height value, in paper units, for the height of region sample swatches within the window.

t_value is the thickness of the color bar in a raster legend frame. The units are inches unless including the Units clause.

l_value is the length of the color bar in a raster legend frame. The units are inches unless including the Units clause.

Description

The Default Frame Title, Default Frame SubTitle, and Default Frame Style clauses define the default titles, subtitles and row text and fonts for each frame, unless per-frame settings override them.

The Default Frame Line Width is width in paper units for line style samples.

The Default Frame Region Width is width in paper units for region style samples.

The Default Frame Region Height is height in paper units for region style samples.

paper_units is a string representing a paper unit name. For details about paper units, see Set Paper Units statement.

Default Frame Auto Font Size enables or disables resizing the legend swatch based on the Style clause font size setting.

Note: The Default Frame Title, Default Frame Subtitle, and Default Frame Style clauses are never applied to thematic layer legends. For a thematic legend, this information is obtained automatically from the theme.

The Default Frame Bar describes the default size and orientation of a color bar for a raster legend and must include at least one of these: Thickness, Length, or orientation (Horizontal or Vertical). Only including Units causes a run-time error (an invalid clause error). If the Default Frame Bar clause is missing, MapInfo Pro uses its default values of 0.25 inches for Thickness, 2.0 inches for Length, and Vertical for the orientation.