[]
        
(Showing Draft Content)

GC.Spread.Sheets.NameBox.NameBox

Class: NameBox

Sheets.NameBox.NameBox

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new NameBox(host, workbook, options?)

Represents name box.

Parameters

Name Type Description
host string | HTMLElement The DOM Element.
workbook Workbook -
options? INameBoxOptions -

Properties

options

options: INameBoxOptions

Indicates the options of the name box.

property [enableAddCustomName] Indicates whether enable add custom name when input a name which is not existed to the selector.

property [enableNavigateToRange] Indicates whether enable navigate to the named range or drawing item when input its name or click on custom list item.

property [showCustomNameList] Indicates whether show the custom name list dropdown indicator.

property [dropDownMaxHeight] Indicates the drop down list element max height.

Methods

dispose

dispose(): void

Dispose the NameBox and unbind all events.

example

var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
var nameBox = new GC.Spread.Sheets.NameBox.NameBox(document.getElementById('nameBox'), spread);
// do something
nameBox.dispose();

Returns

void


getHost

getHost(): HTMLElement

get the NameBox host element.

example

var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
var nameBox = new GC.Spread.Sheets.NameBox.NameBox(document.getElementById('nameBox'), spread);
var host = nameBox.getHost();

Returns

HTMLElement


refresh

refresh(): void

refresh the NameBox and sync the name box value to the work sheet selection.

example

var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
var nameBox = new GC.Spread.Sheets.NameBox.NameBox(document.getElementById('nameBox'), spread);
var sheet = spread.getActiveSheet();
sheet.setSelection(0, 0, 3, 3);
nameBox.refresh();

Returns

void