Reflection Desktop VBA Guide
Attachmate.Reflection.Objects Library / Attachmate.Reflection.Objects.UserInterface Library / View Object / TitleText Property
Example
In This Topic
    TitleText Property
    In This Topic
    Gets or sets the title text of the view.
    Syntax
    expression.TitleText As String
    where expression is a variable that represents a View Object
    Remarks
    In the tabbed view mode (Ribbon interface), this is the text on the tab. In MDI mode, this is the caption of the view window.
    Example
    This example changes the focus to another session in the workspace.
    Sub ChangeFocus()
     
        Dim positionInString As Variant
        Dim viewTitle As String
      
        'Reflection objects required to open a new session
        Dim views() As Attachmate_Reflection_Objects.View
        Dim View As Variant
     
        'Get the text to copy from the current session
        projectName = ThisIbmScreen.GetText(1, 39, 5)
            
        'Get all the view objects in the frame and print the title of each view
        views = ThisFrame.GetViewsByName("")
        
        For Each View In views
            
            'Get the view title
            viewTitle = View.titleText
            
            'If the view title contains session2, change the focus to that session
            positionInString = InStr(viewTitle, "session2")
            
            If positionInString > 0 Then
     
                View.Focus
                
            End If
                            
        Next
     
    End Sub
    See Also