ig.excel.WorkbookColorPalette

Represents the color palette used when the saved file is opened in Microsoft Excel 2003 and earlier versions.

Dependencies

jquery-1.4.4.js
infragistics.util.js
infragistics.ext_collections.js
infragistics.ext_collectionsExtended.js
infragistics.ext_io.js
infragistics.ext_text.js
infragistics.ext_core.js
infragistics.documents.core_core.js
infragistics.ext_ui.js
The current widget has no options.
The current widget has no events.
  • contains

    .contains( color:string );
    Return Type:
    boolean
    Return Type Description:
    Determines whether an equivalent color is in the palette.

    Determines whether the specified color is in the color palette.

    • color
    • Type:string
    • The color to find in the palette.
  • count

    .count( );

    Gets the number of colors in the palette, which is always 56.

  • getIndexOfNearestColor

    .getIndexOfNearestColor( color:string );
    Return Type:
    number
    Return Type Description:
    A 0-based index into the collection of the closest color available in the palette.

    Gets the index of the closest color in the color palette, which will be seen when the file is opened in Microsoft Excel 2003 and older versions.

    • color
    • Type:string
    • The color to match in the palette.
  • isCustom

    .isCustom( );

    Gets the value which indicates whether the palette has been cusotmized.

  • item

    .item( index:number );

    Gets a color in the palette.

    • index
    • Type:number
    • The index of the color to get or set in the palette.

    Exceptions

    Exception Description
    ig.ArgumentOutOfRangeException index is less than 0 or greater than 55.
    ig.ArgumentException The value assigned is an empty color, a system color, or is not opaque.

    Remarks

    When a color is set in the palette, WorkbookColorPalette.isCustom will return True. The palette can than be reset with the WorkbookColorPalette.reset method.

    Colors added to the palette must be opaque.

  • item

    .item( index:number, value:string );

    Sets a color in the palette.

    • index
    • Type:number
    • The index of the color to get or set in the palette.
    • value
    • Type:string

    Exceptions

    Exception Description
    ig.ArgumentOutOfRangeException index is less than 0 or greater than 55.
    ig.ArgumentException The value assigned is an empty color, a system color, or is not opaque.

    Remarks

    When a color is set in the palette, WorkbookColorPalette.isCustom will return True. The palette can than be reset with the WorkbookColorPalette.reset method.

    Colors added to the palette must be opaque.

  • reset

    .reset( );

    Resets the palette back to the default colors for Microsoft Excel.

Copyright © 1996 - 2024 Infragistics, Inc. All rights reserved.