ObjectDCL Banner

AxControl_SetColorProperty Method

Description

This method sets a property to a control.

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.
PropertyName
String identifying the property by name.
nColor
Color describing the color to set.
nRed
Integer describing the amount of red, a value between 0 and 255.
nGreen
Integer describing the amount of green, a value between 0 and 255.
nBlue
Integer describing the amount of blue, a value between 0 and 255.

Return Values

Returns the following according to the situation:

  • T when successful.
  • Nil if the control is not found, the property does not exist or the property is read-only.

AutoLISP Syntax

The recommended convention is passing the control identifier directly:

CopyCode imageCopy Code
(Odcl_AxControl_SetColorProperty 
		MyControlReference [as Reference]
		PropertyName [as String]
		nColor [as Color])

CopyCode imageCopy Code
(Odcl_AxControl_SetColorProperty 
		MyControlReference [as Reference]
		PropertyName [as String]
		nRed [as Integer]
		nGreen [as Integer]
		nBlue [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_AxControl_SetColorProperty 
		ProjectFile [as String]
		DialogName [as String]
		ControlName [as String]
		PropertyName [as String]
		nColor [as Color])

CopyCode imageCopy Code
(Odcl_AxControl_SetColorProperty 
		ProjectFile [as String]
		DialogName [as String]
		ControlName [as String]
		PropertyName [as String]
		nRed [as Integer]
		nGreen [as Integer]
		nBlue [as Integer])

Remarks

See the property of interest to know what string to pass.

Not all properties can be set.

Applies For

ActiveX.

Example

CopyCode imageCopy Code
; Change the property
(Odcl_AxControl_SetColorProperty MyProject_MyForm_MyControl "SomeProperty" 255 128 0)

See Also

AxControl_GetProperty