Send comments on this topic.
View(Object) Method
Attachmate.Reflection.Objects Library (User Interface) > Frame Object > View Method : View(Object) Method
id
A Variant String or Integer.
Gets a View object relative to its title or its indexed position in the views of a given frame.

Syntax

 
object.View( 
   ByVal id As Object
) As View

Parameters

id
A Variant String or Integer.

Return Value

A View object.

Exceptions

ExceptionDescription
System.IndexOutOfRangeExceptionThis exception is thrown when the numeric value that is passed in does not match the 1 based array.

Example

Copy Code
'Get a view based on its index position 
Sub Test_ViewVariantInteger()
   Dim myView As View
   Dim id As Variant
   
   id = 1
    
   Set myView = ThisFrame.View(id)
   myView.TitleText = "Application"
 
End Sub
            
'Get a view based on its title text
Sub Test_ViewVariantString()
Dim myView As View
   Dim id As Variant        
    
   id = "Application"
    
   Set myView = ThisFrame.View(id)
   myView.TitleText = "Application"
            
End Sub

Remarks

When the id parameter is passed as a string, it specifies the title of a view. When id is passed as an integer, it specifies the 1 based index of the view in a given frame. The index value depends on the Workspace UI Preferences settings:

  • The index is based on the left to right progression of tabs. The user can rearrange this order by dragging tabs with the mouse.
  • The index is determined by the order in which the Windows are opened. The user cannot change this order.
  • There is only one view per frame.

See Also