ObjectDCL Banner

ComboBox_AddColor Method

Description

This method will add a color to the specified ComboBox that has the Style property set to 4 - Color.

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.
nNewColor
Integer specifying the color, from 0 to 255.

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 does not have the right style.

AutoLISP Syntax

The recommended convention is passing the control identifier directly:

CopyCode imageCopy Code
(Odcl_ComboBox_AddColor 
		MyControlReference [as Reference]
		nNewColor [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_AddColor
		ProjectFile [as String]
		DialogName [as String]
		ControlName [as String]
		nNewColor [as Integer]
	)

Remarks

This method works only for the colors style.

Applies For

ComboBox.

Example

CopyCode imageCopy Code
; Add a new color to the combobox
(Odcl_ComboBox_AddColor MyProject_MyForm_MyControl 4)