Spread.Sheets Documentation
FormulaTextBox Method
The DOM element. It can be INPUT, TEXTAREA, or editable DIV.
The options. Default is {rangeSelectMode: false, absoluteReference: false}
Represents a formula text box.
Syntax
var value; // Type: any
value = GC.Spread.Sheets.FormulaTextBox.FormulaTextBox(host, options);
function FormulaTextBox( 
   host : Object,
   options : Object
) : any;

Parameters

host
The DOM element. It can be INPUT, TEXTAREA, or editable DIV.
options
The options. Default is {rangeSelectMode: false, absoluteReference: false}
Example
This example allows you to select ranges in the formula text box.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Spread.Sheets Sample</title>
    <link href="./css/gc.spread.sheets.excel2013white.10.x.x.css" rel="stylesheet"/>
    <script src="./scripts/gc.spread.sheets.all.10.x.x.js" type="application/javascript"></script>
    <script type="text/javascript">
        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());
        }
    </script>
</head>
<body>
<div id="ss" style="width:50%; height:400px; border:1px solid gray;"></div>
<br/>
<div id="ftb" style="width:50%;height:20px;border:1px solid gray"></div>
<br/>
<button onclick="buttonClick()">Get Range Text</button>
</body>
</html>
See Also

Reference

FormulaTextBox class

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.