ObjectDCL Banner

AxObject_SetColorProperty Method

Description

This method sets a property to a control.

Parameters

MyOleObject
OleObject to the ActiveX object.
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 object is not found, the property does not exist or the property is read-only.

AutoLISP Syntax

CopyCode imageCopy Code
(Odcl_AxObject_SetColorProperty 
		MyOleObject [as OleObject]
		PropertyName [as String]
		nColor [as Color])

CopyCode imageCopy Code
(Odcl_AxObject_SetColorProperty 
		MyOleObject [as OleObject]
		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
; Get the ActiveX object
(Setq rObject (Odcl_AxControl_GetOleObject MyProject_MyForm_MyControl))
		
; Change the property
(Odcl_AxObject_SetColorProperty rObject "SomeProperty" 255 128 0)

; Release the handle to the ActiveX
(Odcl_AxObject_Close rObject)

See Also

AxObject_GetProperty