home *** CD-ROM | disk | FTP | other *** search
Wrap
<?xml version="1.0" encoding="utf-8"?> <html><head><title>FindPropertyObject Function [Runtime]</title><meta name="filename" content="text/sbasic/common/03103900"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css"> p.P1{ } span.T1{ font-weight:bold;} </style></head><body> <p class="P1"/> <p class="Head1"><a name="findpropertyobject"/><help:link Id="66405" xmlns:help="http://openoffice.org/2000/help">FindPropertyObject Function [Runtime]</help:link></p> <p class="Paragraph">Enables objects to be addressed at run-time as a string parameter using the object name.<a name="ende"/></p> <p class="Paragraph">For instance, the command:</p> <p class="Paragraph">MyObj.Prop1.Command = 5</p> <p class="Paragraph">corresponds to the following command block:</p> <p class="Paragraph">Dim ObjVar as Object</p> <p class="Paragraph">Dim ObjProp as Object</p> <p class="Paragraph">ObjName As String = "MyObj"</p> <p class="Paragraph">ObjVar = FindObject( ObjName As String )</p> <p class="Paragraph">PropName As String = "Prop1"</p> <p class="Paragraph">ObjProp = FindPropertyObject( ObjVar, PropName As String )</p> <p class="Paragraph">ObjProp.Command = 5</p> <p class="Paragraph">Names can be created dynamically at run-time, for example, you could use</p> <p class="Paragraph">"TextEdit1" to TextEdit5" in a loop to create five names.</p> <p class="Paragraph">See also: <help:link Id="66445" Eid="findobject" xmlns:help="http://openoffice.org/2000/help">FindObject</help:link></p> <p class="Paragraph"><span class="T1">Syntax</span>:</p> <p class="Paragraph">FindPropertyObject( ObjVar, PropName As String ) <help:key-word value="FindPropertyObject" tag="kw66405_1" xmlns:help="http://openoffice.org/2000/help"/></p> <p class="Paragraph"><span class="T1">Parameter</span>:</p> <p class="Paragraph">ObjVar: Object variable to be defined dynamically at run-time.</p> <p class="Paragraph">PropName: String specifying the name of the property to be addressed at run-time.</p> <p class="Paragraph"><span class="T1">Example:</span></p> <p class="PropText">REM Refer to the preview control example of the <help:link Id="66710" Eid="drawbox" xmlns:help="http://openoffice.org/2000/help">DrawBox</help:link> method.</p> </body></html>