ObjectDCL Banner

ComboBox_SetEditSel Method

Description

This method highlights characters in the edit control of a ComboBox using a start and end position.

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.
nStartIndex
Integer specifying the start character index.
nEndIndex
Integer specifying the end character index.

Return Values

Returns the following according to the situation:

  • T when successful.
  • Nil if the control is not found or does not support this function.

AutoLISP Syntax

The recommended convention is passing the control identifier directly:

CopyCode imageCopy Code
(Odcl_ComboBox_SetEditSel 
		MyControlReference [as Reference]
		nStartIndex [as Integer]
		nEndIndex [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_ComboBox_SetEditSel
		ProjectFile [as String]
		DialogName [as String]
		ControlName [as String]
		nStartIndex [as Integer]
		nEndIndex [as Integer]
	)

Remarks

This method does not work for styles that are read-only.

Applies For

ComboBox.

Example

CopyCode imageCopy Code
; Select a word--assuming we know where it is
(Odcl_ComboBox_SetEditSel MyProject_MyForm_MyControl 4 7)

See Also

ComboBox_GetEditSel