WinStudio
IWSIDOCollection interface
Returns the name of a property, as specified by an integer, in a collection.
object.GetPropertyName( long )
Part |
Description |
object | Required. The name of a valid IDO collection object. |
long | Required. A long integer corresponding to a property name. The first property name is associated with 0. |
The return value is a string containing the name of a property.
The names of the following properties can be retrieved by means of the GetPropertyName method:
The GetNumProperties method returns the total number of properties in a collection. You can use the number to loop through property names. The association between a property name and an integer is set by the IDO.
Sub Main() Dim i As Integer Dim iNumEntries As Long Dim propertyMsg As String i = 0 ThisForm.SetFocus("grid1") iNumEntries = ThisForm.CurrentIDOCollection.GetNumProperties() propertyMsg = "" Do While i < iNumEntries propertyMsg = propertyMsg & " Property " & (i + 1) & ": " & _ ThisForm.CurrentIDOCollection.GetPropertyName(i) & vbLf i = i + 1 Loop Application.ShowMessage("Total number of properties in this collection: " _ & iNumEntries & vbLf & vbLf & "Properties are: " & vbLf & propertyMsg) End Sub