GetCurrentObjectIndex method (WinStudio scripts)
Applies To
IWSIDOCollection interface
Definition
Returns the index number of the current entry in a specified IDO collection. Read-only.
Syntax
object.GetCurrentObjectIndex( )
Part | Description |
object | Required. A reference to an IDO collection object. |
Remarks
The return value is an integer, 0 to n, where n is the total number of IDO collection entries for the specified IDO collection object.
The current entry whose index is returned might or might not be the object with the current focus. This method returns the index of the currently selected row in whatever collection WinStudio recognizes as the current collection. This method does not return the index of the object whose component has the focus as determined by the user.
Example
Sub Main()
Dim iReturnValue As Integer
Dim oCache As IWSIDOCollection
ThisForm.CurrentIDOCollection = ThisForm.GetSecondaryIDOCollection(2)
oCache = ThisForm.CurrentIDOCollection
iReturnValue = oCache.GetCurrentObjectIndex()
Application.ShowMessage("Current row number: " & (iReturnValue + 1))
oCache.First()
iReturnValue = oCache.GetCurrentObjectIndex()
Application.ShowMessage("Current row number: " & (iReturnValue + 1))
End Main