Alter 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

TheAlter Designer Text statement changes the text string, font style, or text frame position in a Legend window or a Layout window. You can issue this statement from the MapBasic window in MapInfo Pro.

Syntax

Alter Designer Text
	[ Window legend_or_layout_window_id ]
	[ ID textframe_id [ Text { frame_text [ Font... ] }
		[ Position ( x, y ) [ Units paper_units ] ] ] ]

legend_or_layout_window_id is an integer window identifier for the Legend window or Layout window that you can obtain by calling the FrontWindow() function and WindowID() function.

textframe_id is the unique identifier for a text frame (not a legend frame) in the Legend window.

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

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 or the Layout window. The upper left corner of the 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.

If you omit the Window clause, the statement operates on the frontmost open window, or the frontmost Legend window, or the frontmost Layout window.

Example

Alter Designer Text Window frontwindow() 
   ID 1 
      Text "Title Changed" Font("Arial Greek", 0, 14, 14680064) 

See Also:

Create Designer Legend statement, Add Designer Text statement, Remove Designer Text statement