ObjectDCL Banner

ListView_StartLabelEdit Method

Description

This method will force the label of an item to show the edit box, so the user may rename the text content of that item.  When using this method on a ListView control with the Report style setting only the item in the first column may be edited.   This method will not start the editing process if the EditLabel property of the control is set to False.

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.
nItemIndex
Integer specifying row index.

Return Values

Returns the following according to the situation:

  • T when successful.
  • Nil if the control is not found, does not support this function or if there is no such row.

AutoLISP Syntax

The recommended convention is passing the control identifier directly:

CopyCode imageCopy Code
(Odcl_ListView_StartLabelEdit 
		MyControlReference [as Reference]
		nItemIndex [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_ListView_StartLabelEdit
		ProjectFile [as String]
		DialogName [as String]
		ControlName [as String]
		nItemIndex [as Integer])

Remarks

This method is not available for BlockList controls.

Applies For

ListView.

Example

CopyCode imageCopy Code
; Initiate label editing on the 4th row
(Odcl_ListView_StartLabelEdit MyProject_MyForm_MyControl 3)

See Also

ListView_CancelLabelEdit