|
OCSetTextProperty(p_Area;p_Propery;p_Value)
Used to set a property of the Ole object.
The property must be of type String.
"p_Area" is the value of the variable associated with plug-in area, "p_Property" is the name of the OleObject property, and "p_Value" is the value that you want to assign to the property .
This command cannot be used in 4D event handling methods, where you should use instead the OCSetTextOfSender command.
Parameters
| Parameter |
Type |
|
Description |
| p_Area |
Longint |
-> |
Plug-in area identifier.
|
| p_Property |
String |
-> |
Name of the property to which you want to assign a value. |
| p_Value |
String |
-> |
String type value that you want to assign to the property. |
Return Values
0 – The method call was successful.
If the method call was not successful the
return value is not zero. For more information call OCLastError.
Example
$i:=OCSetTextProperty(Area1;"TextProperty";"this is the value")
is equivalent to the following sequence of code:
$i:=OCCreaScriptHost ("ScriptHost")
$i:=OCDeclareObj ("ScriptHost";"OleObj1";Area1)
$i:=OCRunScript ("ScriptHost";"OleObj1.TextProperty = "+char(34)+"this is the value"+char(34))
|