Legend Text 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 LEGEND_TEXT_FRAME_CLAUSE is an optional clause that creates a text frame on the Legend window. It sets the contents of the frame, position in the legend, the text style, and units to display. You can have more than one Legend Text Frame clause.

Syntax

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

Where LEGEND_TEXT_FRAME_CLAUSE is:

Create Designer Legend 
	[ From Window map_window_id ]
	[ Legend Text Frame [ Text { frame_text [ Font... ] } 
		[ Position ( x, y ) [ Units paper_units ] ] ] ]

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.

frame_text is text for a legend title, subtitle, or descriptive text (such as copyright information for example).

x, y specifies the position of a text frame: x from the left of the Legend window, and the y from the top of the Legend window. The origin (0,0) is in the top-left of the Legend window).

paper_units is a string representing a paper unit name: cm (centimeters), mm (millimeters), in (inches), pt (points), and pica. For a list of paper unit names, see Set Paper Units statement.

Description

The Text clause is the text within a text frame. This can be anything, such as a legend title, subtitle, or descriptive text (such as a map description or copyright citation). If Text does not specify the Font clause, then the default font is used.

The Position clause at the frame level specifies the position of a frame if Custom is specified at the window level of the MapBasic statement.