DR Get text width

4D - Documentation   Français   English   German   4D Draw 2004, Command Theme List   4D Draw 2004, Command Alphabetical List   Back   Previous   Next

version 6.0


DR Get text width (area; scope) Integer

ParameterTypeDescription
areaLongint4D Draw area
scopeLongint-3=Selected characters
-1=All
0=Selection
>0=Object ID
Function resultIntegerWidth of the text

Description

The command DR Get text width returns the width of the text in scope. The width is returned in the units specified for the document's ruler.

If scope equals -3, the command returns the width of the selected characters.

If scope equals -1, the command returns the longest text line in the 4D Draw area.

If scope equals 0, the command returns the longest line in the current selection.

If scope is greater than 0, the command returns the longest line in the object identified by the ID number passed as a parameter. If no object corresponds to this ID number, the command returns -32000 and DR Error returns 2.

The values for the scope parameter are listed in the paragraph "Specifying the Scope of a Command" of the Manipulating Objects section.

You can use the DR Get ruler function to determine the current ruler setup.


4D - Documentation   Français   English   German   4D Draw 2004, Command Theme List   4D Draw 2004, Command Alphabetical List   Back   Previous   Next