Setting properties
You access server properties for an OLE control through its
Object property using the following syntax:
1 |
<span>olecontrolname</span>.<span>Object</span>.{<span> serverqualifiers</span>.}<span>propertyname</span> |
If the OLE object is complex, there could be nested objects
or properties within the
object that serve as qualifiers for the property name.
For example, the following commands for an Excel spreadsheet
object activate the object and set the value property of several
cells:
1 |
double value<br>ole_1.Activate(InPlace!)<br>ole_1.Object.cells[1,1].value = 55<br>ole_1.Object.cells[2,2].value = 66<br>ole_1.Object.cells[3,3].value = 77<br>ole_1.Object.cells[4,4].value = 88 |
For an Excel 95 spreadsheet, enclose the cells’ row
and column arguments in parentheses instead of square brackets.
For example:
1 |
ole_1.Object.cells(1,1).value = 55 |
For properties of an OLEObject variable, the server qualifiers
and property name follow the variable name:
1 |
<span>oleobjectvar</span>.{ <span>serverqualifiers</span>.}<span>propertyname</span> |
The qualifiers you need to specify depend on how you connect
to the object. For more information, see “Qualifying server
commands”.
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest