TextSize() function - 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

Purpose

Returns the point size of a text object in a window. You can call this function from the MapBasic window in MapInfo Pro.

Syntax

TextSize( window_id, text_obj )

window_id is the integer window identifier of a Map or Layout window. Call the FrontWindow() function or the WindowID() function to obtain window identifiers.

text_obj is a text object.

Note: If the text object is from a Map window, the window ID must be the ID of a Map window. If the text object is from a Layout, the window ID must be the ID of a Layout window.

Return Value

Float

Description

The TextSize() function will return the point size of a text object in a window at its current zoom level. This function correlates to selecting a text object and then clicking the Get Info command or pressing F7.

Example

If the active window is a map and a text object is selected:

print TextSize(FrontWindow(), selection.obj)

See Also:

Font clause