GetViewportUnderMouse
 
 
 

GetViewportUnderMouse

Introduced

v5.0

Description

Returns the view pane ("A", "B", "C" or "D") under the mouse (or last view pane if mouse is not currently over the view manager).

Scripting Syntax

oReturn = GetViewportUnderMouse();

Return Value

The view pane ("A", "B", "C" or "D") as a string.

Examples

1. VBScript Example

' Get the viewport under the mouse
Application.LogMessage "The view pane with the focus is " & GetViewportUnderMouse
' Logged message will be similar to this:
'INFO : The view pane with the focus is B

2. JScript Example

// Get the type of view embedded in the viewport under the mouse
var oVM = Application.Desktop.ActiveLayout.Views.Find( "View Manager" );
var oView = oVM.Views( GetViewportUnderMouse() );
Application.LogMessage( oView.FullName + ", " + oView.Type );
// Logged message will be similar to this:
//INFO : B, Explorer

See Also

GetFocusedViewport SetFocusedViewport