ObjectDCL Banner

TextBox_GetLineLength Method

Description

This method returns the length of a line in a TextBox.

Parameters

MyControlReference
Reference to the control in the form of MyProject_MyForm_MyControl.
ProjectFile
String identifying the project as it was passed in LoadProject.
DialogName
String identifying the dialog by name.
ControlName
String identifying the control by name.
LineNumber
Integer specifying the line number.

Return Values

Returns the following according to the situation:

  • Integer describing the length of the line.
  • Nil if the control is not found, is not visible or there is no tree item.

AutoLISP Syntax

The recommended convention is passing the control identifier directly:

CopyCode imageCopy Code
(Odcl_TextBox_GetLineLength 
		MyControlReference [as Reference]
		LineNumber [as Integer])

An alternative convention is to identify the control by providing the project file, the dialog name and the control name:

CopyCode imageCopy Code
(Odcl_TextBox_GetLineLength
		ProjectFile [as String]
		DialogName [as String]
		ControlName [as String]
		LineNumber [as Integer])

Applies For

TextBox.

Example

CopyCode imageCopy Code
; Get the length of the second line
(Setq rValue (Odcl_TextBox_GetLineLength MyProject_MyForm_MyControl 1))

See Also

TextBox_GetLine, TextBox_GetLineCount