Add Designer Text statement - 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

This statement adds text frames to an existing Legend window created with the Create Designer Legend statement. You can issue this statement from the MapBasic window in MapInfo Pro.

Syntax

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

legend_window_id is an integer window identifier that you can obtain by calling the FrontWindow() function and WindowID() function.

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

x states the desired distance from the top of the workspace to the top edge of the window.

y states the desired distance from the left of the workspace to the left edge of the window.

Note: Here workspace means the client area (which excludes the title bar, tool bar, and the status bar).

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

Description

Legend Text Frame creates a text frame in the Legend window.

If Text does not specify the Font clause, then the default font is used.

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. You can override the current paper units by including the optional Units subclause within the Position clause.

Example

Add Designer Text Window frontwindow() 
   Legend Text Frame 
      Text "This is My title" Font("Batang", 3, 12, 16711680)

See Also:

Create Designer Legend statement, Add Designer Frame statement, Add Designer Text statement, Add Image Frame statement, Add Image Page statement, Alter Designer Text statement, Remove Designer Text statement