[]
Sheets.FormulaTextBox.FormulaTextBox
• new FormulaTextBox(host, options?)
Represents a formula text box.
example
window.onload = function(){
var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount: 1 });
rangeSelector = new GC.Spread.Sheets.FormulaTextBox.FormulaTextBox(document.getElementById("ftb"), {rangeSelectMode: true});
rangeSelector.workbook(spread);
}
function buttonClick(){
alert(rangeSelector.text());
}
| Name | Type | Description |
|---|---|---|
host |
HTMLElement |
The DOM element. It can be INPUT, TEXTAREA, or editable DIV. |
options? |
IFormulaTextBoxOptions |
- |
▸ add(functionDescription): void
Adds a custom function description.
| Name | Type | Description |
|---|---|---|
functionDescription |
IFunctionDescription |
The function description to add. This can be an array. See the Remarks for more information. |
void
▸ autoComplete(value?): boolean
Gets or sets whether the text box uses automatic complete.
| Name | Type | Description |
|---|---|---|
value? |
boolean |
Whether to use automatic complete when editing. |
boolean
If no value is set, returns whether the text box uses auto complete; otherwise, there is no return value.
▸ destroy(): void
Removes host from formula text box and removes all binding events.
void
▸ refresh(ignoreEditing?): void
refresh the formula text box with the active cell.
| Name | Type |
|---|---|
ignoreEditing? |
boolean |
void
▸ remove(name): void
Removes a custom function description.
| Name | Type | Description |
|---|---|---|
name |
string |
The custom function description name. |
void
▸ showHelp(value?): any
Gets or sets whether to display the function's help tip.
| Name | Type | Description |
|---|---|---|
value? |
boolean |
Whether to display the function's help tip when editing. |
any
If no value is set, returns whether the text box displays the function's help tip when editing; otherwise, there is no return value.
▸ text(value?): string
Gets or sets the text.
| Name | Type | Description |
|---|---|---|
value? |
string |
The text. |
string
If no value is set, returns the text; otherwise, there is no return value.
▸ workbook(value?): Workbook
Gets or sets the Workbook component to work with the formula text box.
example
window.onload = function(){
var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"),{sheetCount:3});
var activeSheet = spread.getActiveSheet();
activeSheet.setArray(0, 0, [1, 2, 3, 4, 5]);
var fbx = new GC.Spread.Sheets.FormulaTextBox.FormulaTextBox(document.getElementById("formulaTextBox"));
fbx.workbook(spread);
};
| Name | Type | Description |
|---|---|---|
value? |
Workbook |
The Workbook component. |
If no value is set, returns the workbook component; otherwise, there is no return value.