ActiveWindow

Updated at:

API operations for the ActiveWindow of table documents.

ActiveWindow

ActiveWindow

Gets the active window.

  • Syntax

    expression.ActiveWindow

    expression: the document type application object.

  • Example

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

Properties

ActiveWindow.DisplayGridlines

Gets or sets whether gridlines are displayed in the active window.

  • Syntax

    expression.ActiveWindow.DisplayGridlines=Boolean

    expression: the document type application object.

    Set Boolean to true to show gridlines, or false to hide them.

  • Example

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

ActiveWindow.DisplayHeadings

Gets or sets whether row and column headings are displayed in the active window.

  • Syntax

    expression.ActiveWindow.DisplayHeadings=Boolean

    expression: the document type application object.

    Set Boolean to true to show row and column headings, or false to hide them.

  • Example

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

ActiveWindow.Zoom

Gets or sets the zoom level of the active window as a percentage. The default value is 100, which represents the normal size.

  • Syntax

    expression.ActiveWindow.Zoom

    expression: the document type application object.

  • Return values

    Returns a Number that represents the zoom level of the active window.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Get the zoom level. The default is 100 (normal size).
      const zoom = await app.ActiveWindow.Zoom;
      console.log(zoom);
    
      // Set the zoom level.
      app.ActiveWindow.Zoom = 10;
    }

ActiveWindow.ScrollColumn

Gets or sets the number of the leftmost column in the active window.

Important

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

  • Syntax

    expression.ActiveWindow.ScrollColumn

    expression: the document type application object.

  • Return values

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

  • Example

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

ActiveWindow.ScrollRow

Gets or sets the number of the row at the top of the active window.

Important

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

  • Syntax

    expression.ActiveWindow.ScrollRow

    expression: the document type application object.

  • Return values

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

  • Example

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

ActiveWindow.VertIndex

Gets or sets the vertical scroll offset of the active window, in pixels.

  • Syntax

    expression.ActiveWindow.VertIndex

    expression: the document type application object.

  • Return values

    Returns a Number that represents the vertical scroll offset. Unit: pixels.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Get the vertical scroll offset in pixels.
      const value = await app.ActiveWindow.VertIndex;
      console.log(value);
    
      // Set the vertical scroll offset to 300 pixels.
      app.ActiveWindow.VertIndex = 300;
    }

ActiveWindow.HorzIndex

Gets or sets the horizontal scroll offset of the active window, in pixels.

  • Syntax

    expression.ActiveWindow.HorzIndex

    expression: the document type application object.

  • Return values

    Returns a Number that represents the horizontal scroll offset. Unit: pixels.

  • Example

    async function example() {
      await instance.ready();
    
      const app = instance.Application;
    
      // Get the horizontal scroll offset in pixels.
      const value = await app.ActiveWindow.HorzIndex;
      console.log(value);
    
      // Set the horizontal scroll offset to 300 pixels.
      app.ActiveWindow.HorzIndex = 300;
    }