ObjectDCL Banner

AxControl_SetProperty 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.
PropertyValue
The value to set, which can be of the type relevant to the property. A best effort is made to convert the argument to the destination type.

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_SetProperty 
		MyControlReference [as Reference]
		PropertyName [as String]
		PropertyValue [as Any])

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_SetProperty
		ProjectFile [as String]
		DialogName [as String]
		ControlName [as String]
		PropertyName [as String]
		PropertyValue [as Any])

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_SetProperty MyProject_MyForm_MyControl "SomeProperty" T)

See Also

AxControl_GetProperty