All Products
Search
Document Center

Intelligent Media Management:ActiveWindow

Last Updated:Oct 29, 2024

This topic describes the API operations that are related to the ActiveWindow of table documents.

ActiveWindow

ActiveWindow

Obtains the active window.

  • Syntax

    expression.ActiveWindow

    expression: the document type application object.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the active window.
      const activeWindow = await app.ActiveWindow;
    }

Properties

ActiveWindow.DisplayGridlines

By using the DisplayGridlines property, you can specify whether gridlines are displayed in the active window.

  • Syntax

    expression.ActiveWindow.DisplayGridlines=Boolean

    expression: the document type application object.

    If you set Boolean to true, the gridlines are displayed. If you set Boolean to false, gridlines are hidden.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Hide gridlines.
      app.ActiveWindow.DisplayGridlines = false;
    }

ActiveWindow.DisplayHeadings

By using the DisplayHeadings property, you can specify whether row and column headings of the active window are displayed.

  • Syntax

    expression.ActiveWindow.DisplayHeadings=Boolean

    expression: the document type application object.

    If you set Boolean to true, row and column headings are displayed. If you set Boolean to false, row and column headings are hidden.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Hide row and column headings
      app.ActiveWindow.DisplayHeadings = false;
    }

ActiveWindow.Zoom

By using the Zoom property, you can specify and obtain the display size of the active window as a percentage.

  • Syntax

    expression.ActiveWindow.Zoom

    expression: the document type application object.

  • Return values

    Returns a Number that indicates the display size of the active window.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the display size of the active window as a percentage. The default value is 100, which indicates the normal size.
      const zoom = await app.ActiveWindow.Zoom;
      console.log(zoom);
    
      // Set the display size.
      app.ActiveWindow.Zoom = 10;
    }

ActiveWindow.ScrollColumn

You can specify and obtain the number of the leftmost column in the active window by using the ScrollColumn property.

Important

Only JS-SDK V1.1.10 and later support this feature.

  • Syntax

    expression.ActiveWindow.ScrollColumn

    expression: the document type application object.

  • Return values

    Returns a Number that indicates the number of the leftmost column.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the number of the leftmost column in the active windows.
      const ScrollColumn = await app.ActiveWindow.ScrollColumn;
      console.log(ScrollColumn);
    
      // Specify the number of the leftmost column in the active windows.
      app.ActiveWindow.ScrollColumn = 10;
    }

ActiveWindow.ScrollRow

By using the ScrollRow property, you can specify and obtain the number of the row that appears at the top of the active window.

Important

Only JS-SDK V1.1.10 and later support this feature.

  • Syntax

    expression.ActiveWindow.ScrollRow

    expression: the document type application object.

  • Return values

    Returns a Number that indicates the number of the row at the top of the active window.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the number of the row at the top of the active window.
      const ScrollRow = await app.ActiveWindow.ScrollRow;
      console.log(ScrollRow);
    
      // Specify the number of the row at the top of the active window.
      app.ActiveWindow.ScrollRow = 10;
    }

ActiveWindow.VertIndex

By using the VertIndex property, you can specify and obtain the vertical distance that the active window is scrolled.

  • Syntax

    expression.ActiveWindow.VertIndex

    expression: the document type application object.

  • Return values

    Returns a Number that indicates the vertical distance that the active window is scrolled. Unit: pixels.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the vertical distance that the active window is scrolled.
      const value = await app.ActiveWindow.VertIndex;
      console.log(value);
    
      // Specify the vertical distance that the active window is scrolled.
      app.ActiveWindow.VertIndex = 300;
    }

ActiveWindow.HorzIndex

By using the HorzIndex property, you can specify and obtain the horizontal distance that the active window is scrolled.

  • Syntax

    expression.ActiveWindow.HorzIndex

    expression: the document type application object.

  • Return values

    Returns a Number that indicates the horizontal distance that the active window is scrolled. Unit: pixels.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
      
      // Obtain the horizontal distance that the active window is scrolled.
      const value = await app.ActiveWindow.HorzIndex;
      console.log(value);
    
      // Specify the horizontal distance that the active window is scrolled.
      app.ActiveWindow.HorzIndex = 300;
    }