78
Is it possible to change the line's height

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.Text = "(1+6.25)/4*6/3";
	CalcEdit1.InsertText("(2+6.25)/4*6/3\\r\\n",1);
	CalcEdit1.InsertText("(3+6.25)/4*6/3\\r\\n",1);
	CalcEdit1.InsertText("(4+6.25)/4*6/3\\r\\n",1);
	CalcEdit1.InsertText("Total",null);
	CalcEdit1.LineHeight = "value + 8 * dpi";
	CalcEdit1.DrawGridLines = true;
}
</SCRIPT>
</BODY>

77
How do I put a picture on the control's background

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.Picture = CalcEdit1.ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)");
	CalcEdit1.PictureDisplay = 0;
	CalcEdit1.MultiLine = true;
	CalcEdit1.Text = "(1+6.25)/4*6/3";
	CalcEdit1.InsertText("\\r\\n",1);
	CalcEdit1.InsertText("\\r\\n",1);
	CalcEdit1.InsertText("\\r\\n",1);
	alert( "Expression: " );
	alert( CalcEdit1.Text );
	alert( "Result: " );
	alert( CalcEdit1.Result(null) );
}
</SCRIPT>
</BODY>

76
How do I get the numbers only, with no Total fields (method 2)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.FormatResult = "<fgcolor=808080><r> = %%";
	CalcEdit1.InsertText("100 * 200",null);
	CalcEdit1.InsertText("300 * 400 * 1.5",null);
	CalcEdit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)",null);
	CalcEdit1.InsertText("Total",null);
	alert( CalcEdit1.ExecuteTemplate("FormatABC(\"lower(A) replace `total` with ``\", Text)") );
}
</SCRIPT>
</BODY>

75
How do I get the numbers only, with no Total fields (method 1)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.FormatResult = "<fgcolor=808080><r> = %%";
	CalcEdit1.InsertText("100 * 200",null);
	CalcEdit1.InsertText("300 * 400 * 1.5",null);
	CalcEdit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)",null);
	CalcEdit1.InsertText("Total",null);
	alert( CalcEdit1.FormatABC("lower(A) replace `total` with ``",CalcEdit1.Text,null,null) );
}
</SCRIPT>
</BODY>

74
How do I customize the format to display the result (right,local,2 decimals,less,font)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.LineHeight = "value + 8 * dpi";
	CalcEdit1.FormatLocal = "( value < 10000 ? `<fgcolor=000000><b><font ;16>` : ``) + (value format `2`)";
	CalcEdit1.FormatResult = "<fgcolor=808080><r> = %l%";
	CalcEdit1.InsertText("100 * 200",null);
	CalcEdit1.InsertText("300 * 400 * 1.5",null);
	CalcEdit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)",null);
}
</SCRIPT>
</BODY>

73
How do I customize the format to display the result (right,local,2 decimals,greater,color)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.FormatLocal = "( value > 10000 ? `<fgcolor=FF0000><b>` : ``) + (value format `2`)";
	CalcEdit1.FormatResult = "<fgcolor=808080><r> = %l%";
	CalcEdit1.InsertText("100 * 200",null);
	CalcEdit1.InsertText("300 * 400 * 1.5",null);
	CalcEdit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)",null);
}
</SCRIPT>
</BODY>

72
How do I customize the format to display the result (right,local,all decimals)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.FormatLocal = "value";
	CalcEdit1.FormatResult = "<fgcolor=808080><r> = %l%";
	CalcEdit1.InsertText("100 * 200",null);
	CalcEdit1.InsertText("300 * 400 * 1.5",null);
	CalcEdit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)",null);
}
</SCRIPT>
</BODY>

71
How do I customize the format to display the result (right,local,2 decimals)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.FormatLocal = "value format `2`";
	CalcEdit1.FormatResult = "<fgcolor=808080><r> = %l%";
	CalcEdit1.InsertText("100 * 200",null);
	CalcEdit1.InsertText("300 * 400 * 1.5",null);
	CalcEdit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)",null);
}
</SCRIPT>
</BODY>

70
How do I customize the format to display the result (right,local,curency)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.FormatLocal = "currency(value)";
	CalcEdit1.FormatResult = "<fgcolor=808080><r> = %l%";
	CalcEdit1.InsertText("100 * 200",null);
	CalcEdit1.InsertText("300 * 400 * 1.5",null);
	CalcEdit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)",null);
}
</SCRIPT>
</BODY>

69
How do I customize the format to display the result (right,local)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.FormatResult = "<fgcolor=808080><r> = %l%";
	CalcEdit1.InsertText("100 * 200",null);
	CalcEdit1.InsertText("300 * 400 * 1.5",null);
	CalcEdit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)",null);
}
</SCRIPT>
</BODY>

68
How do I customize the format to display the result (right)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.FormatResult = "<fgcolor=808080><r> = %%";
	CalcEdit1.InsertText("100 * 200",null);
	CalcEdit1.InsertText("300 * 400 * 1.5",null);
	CalcEdit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)",null);
}
</SCRIPT>
</BODY>

67
How do I customize the format to display the result (default)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.InsertText("100 * 200",null);
	CalcEdit1.InsertText("300 * 400 * 1.5",null);
	CalcEdit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)",null);
}
</SCRIPT>
</BODY>

66
How can I force a line to be there all the time, so user can not delete it, for instance Total

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.InsertLockedText("Total",null);
	CalcEdit1.InsertText("100",null);
	CalcEdit1.InsertText("200",null);
	CalcEdit1.InsertText("300",null);
}
</SCRIPT>
</BODY>

65
Is it possible to get the value of specified variable

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.InsertText("100",null);
	CalcEdit1.InsertText("200",null);
	CalcEdit1.InsertText("300",null);
	CalcEdit1.InsertText("TVA = Total * 0.19",null);
	CalcEdit1.InsertText("Total",null);
	alert( "The TVA is: " );
	alert( CalcEdit1.Variable("TVA") );
}
</SCRIPT>
</BODY>

64
How do I get the total

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.InsertText("100",null);
	CalcEdit1.InsertText("200",null);
	CalcEdit1.InsertText("300",null);
	CalcEdit1.InsertText("Total",null);
	alert( "The total is: " );
	alert( CalcEdit1.Variable("Total") );
}
</SCRIPT>
</BODY>

63
How do I get the easter date

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.CalcType = -1;
	CalcEdit1.ClearWildFormats();
	CalcEdit1.FormatResult = "<r><fgcolor=008000><b>(%%)";
	CalcEdit1.AllowComments = "<fgcolor=008000>//";
	CalcEdit1.AddWildFormat("*=*<fgcolor=008000>//*");
	CalcEdit1.AddWildFormat("<fgcolor=808080>V*=*");
	CalcEdit1.AddWildFormat("<b>EasterSundayDay*=*");
	CalcEdit1.BackColorLockedLine = 0;
	CalcEdit1.ForeColorLockedLine = 0;
	CalcEdit1.Text = "Year = 2018 // change here the year, to get the Easter Sunday for giving year";
	CalcEdit1.InsertLockedText("V1 = (((255 - 11 * (Year mod 19)) - 21) mod 30)",null);
	CalcEdit1.InsertLockedText("V2 = ((V1 + 21) + (V1 > 48 ? -1 : 0) + 6 - ((Year + int(Year / 4)) + V1 + (V1 > 48 ? -1 : 0) + 1) mod 7)",null);
	CalcEdit1.InsertLockedText("EasterSundayDay = date(dateS('3/1/' + Year)  + V2)",null);
	alert( "Easter Sunday Day is " );
	alert( CalcEdit1.Variable("EasterSundayDay") );
	alert( " for year " );
	alert( CalcEdit1.Variable("Year") );
}
</SCRIPT>
</BODY>

62
I've got a red line while I type into the control. How can I disable that (sample 2)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.AllowFormatInvalidOnTyping = false;
	CalcEdit1.MultiLine = true;
	CalcEdit1.Text = "100 + 200(invalid)";
}
</SCRIPT>
</BODY>

61
I've got a red line while I type into the control. How can I disable that (sample 1)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.FormatInvalid = "";
	CalcEdit1.Text = "100 + 200(invalid)";
}
</SCRIPT>
</BODY>

60
How do I specify the color to show the locked lines

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.AllowVariables = "=";
	CalcEdit1.DrawGridLines = true;
	CalcEdit1.LineHeight = "value + 8 * dpi";
	CalcEdit1.GridLineColor = 12895428;
	CalcEdit1.FormatResult = "<r>[=%l%]";
	CalcEdit1.FormatLocal = "currency(value)";
	CalcEdit1.FormatTotalResult = "<r><b> <fgcolor=FFFFFF>= %l%</b>";
	CalcEdit1.BackColorLockedLine = 65536;
	CalcEdit1.ForeColorLockedLine = 16777215;
	CalcEdit1.InsertText("100",null);
	CalcEdit1.InsertText("200",null);
	CalcEdit1.InsertLockedText("VAT = Total * 0.20",null);
	CalcEdit1.InsertLockedText("Total",null);
}
</SCRIPT>
</BODY>

59
Can I remove the colors that indicates locked lines

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.AllowVariables = "=";
	CalcEdit1.DrawGridLines = true;
	CalcEdit1.LineHeight = "value + 8 * dpi";
	CalcEdit1.GridLineColor = 12895428;
	CalcEdit1.FormatResult = "<r><fgcolor=808080>[=%l%]";
	CalcEdit1.FormatLocal = "currency(value)";
	CalcEdit1.FormatTotalResult = "<r><b> = %l%</b>";
	CalcEdit1.BackColorLockedLine = 0;
	CalcEdit1.ForeColorLockedLine = 0;
	CalcEdit1.InsertText("100",null);
	CalcEdit1.InsertText("200",null);
	CalcEdit1.InsertLockedText("VAT = Total * 0.20",null);
	CalcEdit1.InsertLockedText("Total",null);
}
</SCRIPT>
</BODY>

58
Can I add lines to the control, so the user can not remove/delete them ( locked lines )

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.CalcType = -1;
	CalcEdit1.AllowVariables = "=";
	CalcEdit1.DrawGridLines = true;
	CalcEdit1.LineHeight = "value + 8 * dpi";
	CalcEdit1.GridLineColor = 12895428;
	CalcEdit1.FormatResult = "<r><fgcolor=808080>[=%l%]";
	CalcEdit1.FormatLocal = "currency(value)";
	CalcEdit1.FormatTotalResult = "<r><b> = %l%</b>";
	CalcEdit1.Text = "1000";
	CalcEdit1.InsertText("2000",null);
	CalcEdit1.InsertLockedText("Commission = Total * 0.05 + (Total ? 2.95 : 0)",null);
	CalcEdit1.InsertLockedText("Total",null);
}
</SCRIPT>
</BODY>

57
Is it possible to highlight a specified line

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.AllowVariables = "=";
	CalcEdit1.DrawGridLines = true;
	CalcEdit1.LineHeight = "value + 8 * dpi";
	CalcEdit1.GridLineColor = 12895428;
	CalcEdit1.FormatResult = "<r><fgcolor=808080>[=%l%]";
	CalcEdit1.FormatLocal = "currency(value)";
	CalcEdit1.FormatTotalResult = "<r><b> = %l%</b>";
	CalcEdit1.AddWildFormat("<fgcolor=00FF00>*<b>Commission</b>*=*");
	CalcEdit1.Text = "100.50 + 123";
	CalcEdit1.InsertText("200 + 20/5",null);
	CalcEdit1.InsertText("300 + 3 * 15",null);
	CalcEdit1.InsertText("400 + 200 * (10 + 12/45)",null);
	CalcEdit1.InsertText("50 * 45",null);
	CalcEdit1.InsertText("VAT = Total * 0.19",null);
	CalcEdit1.InsertText("NET = Total - VAT",null);
	CalcEdit1.InsertText("Monthly = Total / 12",null);
	CalcEdit1.InsertText("Commission = Total * 0.05 + 2.95",null);
	CalcEdit1.InsertText("Total",null);
}
</SCRIPT>
</BODY>

56
Is it possible to display the result as currency

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.AllowVariables = "=";
	CalcEdit1.DrawGridLines = true;
	CalcEdit1.LineHeight = "value + 8 * dpi";
	CalcEdit1.GridLineColor = 12895428;
	CalcEdit1.FormatLocal = "currency(value)";
	CalcEdit1.FormatTotalResult = "<r><b> = %l%</b>";
	CalcEdit1.BackColorTotal = 15790320;
	CalcEdit1.Text = "100.50";
	CalcEdit1.InsertText("200",null);
	CalcEdit1.InsertText("300",null);
	CalcEdit1.InsertText("400",null);
	CalcEdit1.InsertText("VAT = Total * 0.19",null);
	CalcEdit1.InsertText("NET = Total - VAT",null);
	CalcEdit1.InsertText("Total",null);
}
</SCRIPT>
</BODY>

55
Is it possible to display the result with no decimals

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.AllowVariables = "=";
	CalcEdit1.DrawGridLines = true;
	CalcEdit1.LineHeight = "value + 8 * dpi";
	CalcEdit1.GridLineColor = 12895428;
	CalcEdit1.FormatLocal = "value format `0`";
	CalcEdit1.FormatTotalResult = "<r><b> = %l%</b>";
	CalcEdit1.BackColorTotal = 15790320;
	CalcEdit1.Text = "100.50";
	CalcEdit1.InsertText("200",null);
	CalcEdit1.InsertText("300",null);
	CalcEdit1.InsertText("400",null);
	CalcEdit1.InsertText("VAT = Total * 0.19",null);
	CalcEdit1.InsertText("NET = Total - VAT",null);
	CalcEdit1.InsertText("Total",null);
}
</SCRIPT>
</BODY>

54
Is it possible to display the result exactly how it is defined in the control panel

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.AllowVariables = "=";
	CalcEdit1.DrawGridLines = true;
	CalcEdit1.LineHeight = "value + 8 * dpi";
	CalcEdit1.GridLineColor = 12895428;
	CalcEdit1.FormatLocal = "value format ``";
	CalcEdit1.FormatTotalResult = "<r><b> = %l%</b>";
	CalcEdit1.BackColorTotal = 15790320;
	CalcEdit1.Text = "100.50";
	CalcEdit1.InsertText("200",null);
	CalcEdit1.InsertText("300",null);
	CalcEdit1.InsertText("400",null);
	CalcEdit1.InsertText("VAT = Total * 0.19",null);
	CalcEdit1.InsertText("NET = Total - VAT",null);
	CalcEdit1.InsertText("Total",null);
}
</SCRIPT>
</BODY>

53
How can I count the lines

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.AllowCount = "count";
	CalcEdit1.AllowSubCount = "subcount";
	CalcEdit1.DrawGridLines = true;
	CalcEdit1.LineHeight = "value + 8 * dpi";
	CalcEdit1.GridLineColor = 12895428;
	CalcEdit1.InsertText("100",null);
	CalcEdit1.InsertText("200",null);
	CalcEdit1.InsertText("SubCount",null);
	CalcEdit1.InsertText("300",null);
	CalcEdit1.InsertText("400",null);
	CalcEdit1.InsertText("500",null);
	CalcEdit1.InsertText("SubCount",null);
	CalcEdit1.InsertText("Count",null);
}
</SCRIPT>
</BODY>

52
How can I compute the average
<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.AllowVariables = "=";
	CalcEdit1.DrawGridLines = true;
	CalcEdit1.LineHeight = "value + 8 * dpi";
	CalcEdit1.GridLineColor = 12895428;
	CalcEdit1.FormatTotalResult = "<r><b> = %l%</b>";
	CalcEdit1.BackColorTotal = 15790320;
	CalcEdit1.Text = "Average = Total / Count";
	CalcEdit1.InsertText("100",null);
	CalcEdit1.InsertText("200",null);
	CalcEdit1.InsertText("300",null);
	CalcEdit1.InsertText("400",null);
	CalcEdit1.InsertText("VAT = Total * 0.19",null);
	CalcEdit1.InsertText("NET = Total - VAT",null);
	CalcEdit1.InsertText("Total",null);
}
</SCRIPT>
</BODY>

51
Variables or Computed Fields

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.AllowVariables = "=";
	CalcEdit1.DrawGridLines = true;
	CalcEdit1.LineHeight = "value + 8 * dpi";
	CalcEdit1.GridLineColor = 12895428;
	CalcEdit1.FormatTotalResult = "<r><b> = %l%</b>";
	CalcEdit1.BackColorTotal = 15790320;
	CalcEdit1.Text = "100";
	CalcEdit1.InsertText("200",null);
	CalcEdit1.InsertText("300",null);
	CalcEdit1.InsertText("400",null);
	CalcEdit1.InsertText("VAT = Total * 0.19",null);
	CalcEdit1.InsertText("NET = Total - VAT",null);
	CalcEdit1.InsertText("Total",null);
}
</SCRIPT>
</BODY>

50
I have noticed that definition of the variable is shown in italics. Can I change that

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.AllowVariables = "=";
	CalcEdit1.ClearWildFormats();
	CalcEdit1.AddWildFormat("<b>*=*");
	CalcEdit1.Text = "A = 400";
	CalcEdit1.InsertText("",null);
	CalcEdit1.InsertText("B = A + 0.22",null);
	CalcEdit1.InsertText("A + B",null);
	CalcEdit1.InsertText("B = B * .19",null);
	CalcEdit1.InsertText("A + B",null);
}
</SCRIPT>
</BODY>

49
I have noticed that definition of the variable is shown in italics. Can I remove that

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.AllowVariables = "=";
	CalcEdit1.ClearWildFormats();
	CalcEdit1.Text = "A = 300";
	CalcEdit1.InsertText("",null);
	CalcEdit1.InsertText("B = A + 0.22",null);
	CalcEdit1.InsertText("A + B",null);
	CalcEdit1.InsertText("B = B * .19",null);
	CalcEdit1.InsertText("A + B",null);
}
</SCRIPT>
</BODY>

48
Can I define variables (sample 2)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.AllowVariables = "is";
	CalcEdit1.ClearWildFormats();
	CalcEdit1.AddWildFormat("<b>*is*");
	CalcEdit1.Text = "A is 200";
	CalcEdit1.InsertText("",null);
	CalcEdit1.InsertText("B is A + 0.22",null);
	CalcEdit1.InsertText("A + B",null);
	CalcEdit1.InsertText("B is B * .19",null);
	CalcEdit1.InsertText("A + B",null);
}
</SCRIPT>
</BODY>

47
Can I define variables (sample 1)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.AllowVariables = "=";
	CalcEdit1.Text = "A = 100.22";
	CalcEdit1.InsertText("",null);
	CalcEdit1.InsertText("B = A + 0.22",null);
	CalcEdit1.InsertText("A + B",null);
	CalcEdit1.InsertText("B = B * .19",null);
	CalcEdit1.InsertText("A + B",null);
}
</SCRIPT>
</BODY>

46
Comments and Prefixes

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.AllowPrefixes = "<fgcolor=808080>:</fgcolor>";
	CalcEdit1.AllowComments = "<fgcolor=008080>'</fgcolor>";
	CalcEdit1.Text = "Field A: 100 ' this is the field A";
	CalcEdit1.InsertText("Field B: 200 ' this is the field B",null);
	CalcEdit1.InsertText("Total",null);
}
</SCRIPT>
</BODY>

45
Can I display something at the start of each line

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.AllowPrefixes = "<b>:</b>";
	CalcEdit1.Text = "Field A: 100";
	CalcEdit1.InsertText("Field B: 200",null);
	CalcEdit1.InsertText("Total",null);
}
</SCRIPT>
</BODY>

44
I can not use TAB key. Is it possible
<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.UseTabKey = true;
}
</SCRIPT>
</BODY>

43
Does your control support comments

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.CalcType = -1;
	CalcEdit1.AllowComments = "<fgcolor=008080>//</fgcolor>";
	CalcEdit1.Text = "104 mod 51 // modulo function";
	CalcEdit1.InsertText("int(104/51)  // int function",null);
	CalcEdit1.InsertText("51 * int(104/51) + (104 mod 51)  // check",null);
}
</SCRIPT>
</BODY>

42
Can I use the modulo function ( rest )

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.CalcType = -1;
	CalcEdit1.Text = "104 mod 51";
	CalcEdit1.InsertText("int(104/51)",null);
	CalcEdit1.InsertText("51 * int(104/51) + (104 mod 51)",null);
}
</SCRIPT>
</BODY>

41
Can I use acos function

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.CalcType = -1;
	CalcEdit1.Text = "acos(cos(1))";
}
</SCRIPT>
</BODY>

40
Can I use asin function

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.CalcType = -1;
	CalcEdit1.Text = "asin(sin(1))";
}
</SCRIPT>
</BODY>

39
Can I use cos function

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.CalcType = -1;
	CalcEdit1.Text = "cos(1)";
}
</SCRIPT>
</BODY>

38
Can I use sin function

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.CalcType = -1;
	CalcEdit1.Text = "sin(1)";
}
</SCRIPT>
</BODY>

37
Can I use abs function (absolute part of the number)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.CalcType = -1;
	CalcEdit1.Text = "abs(-100.99)";
}
</SCRIPT>
</BODY>

36
Can I use round function

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.CalcType = -1;
	CalcEdit1.Text = "round(100.99)";
}
</SCRIPT>
</BODY>

35
Can I use int function (integer part of a number)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.CalcType = -1;
	CalcEdit1.Text = "int(100.99)";
}
</SCRIPT>
</BODY>

34
Can I use sqrt function (square root of a number)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.CalcType = -1;
	CalcEdit1.Text = "sqrt(100)";
}
</SCRIPT>
</BODY>

33
How can I show invalid lines with a larger font

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.LineHeight = "value + 8 *dpi";
	CalcEdit1.DrawGridLines = true;
	CalcEdit1.FormatInvalid = "<u><font ;12> </font></u>";
	CalcEdit1.InsertText("100",null);
	CalcEdit1.InsertText("k200",null);
	CalcEdit1.InsertText("300",null);
}
</SCRIPT>
</BODY>

32
I've noticed that while I type the text is shown in red. How can I change that

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.FormatInvalid = "";
	CalcEdit1.Text = "100 * 200";
}
</SCRIPT>
</BODY>

31
Can I enlarge the height of each line

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.LineHeight = "value + 8 * dpi";
	CalcEdit1.DrawGridLines = true;
	CalcEdit1.InsertText("100",null);
	CalcEdit1.InsertText("200",null);
	CalcEdit1.InsertText("300",null);
	CalcEdit1.InsertText("Total",null);
}
</SCRIPT>
</BODY>

30
How can I show grid lines

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.DrawGridLines = true;
	CalcEdit1.GridLineColor = 0;
	CalcEdit1.InsertText("100",null);
	CalcEdit1.InsertText("200",null);
	CalcEdit1.InsertText("300",null);
	CalcEdit1.InsertText("Total",null);
}
</SCRIPT>
</BODY>

29
How can I display the result of the total with a larger font

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.DrawGridLines = true;
	CalcEdit1.LineHeight = "value  + 8 * dpi";
	CalcEdit1.FormatTotalResult = "<r><b><font ;14>%l%</font></b>";
	CalcEdit1.AllowTotal = "<b><font ;14>Total</font></b>";
	CalcEdit1.InsertText("100",null);
	CalcEdit1.InsertText("200",null);
	CalcEdit1.InsertText("300",null);
	CalcEdit1.InsertText("Total",null);
}
</SCRIPT>
</BODY>

28
Is it possible to show the Total / SubTotal with a different background color

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.AllowTotal = "<bgcolor=A0A0A0><b>Total</b></bgcolor>";
	CalcEdit1.AllowSubTotal = "<bgcolor=E0E0E0><b>SubTotal</b></bgcolor>";
	CalcEdit1.InsertText("100",null);
	CalcEdit1.InsertText("200",null);
	CalcEdit1.InsertText("SubTotal",null);
	CalcEdit1.InsertText("300",null);
	CalcEdit1.InsertText("400 * 1.5",null);
	CalcEdit1.InsertText("SubTotal",null);
	CalcEdit1.InsertText("Total",null);
}
</SCRIPT>
</BODY>

27
Is it possible to show the Total / SubTotal with a different background color

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.BackColorTotal = 12895428;
	CalcEdit1.BackColorSubTotal = 15790320;
	CalcEdit1.InsertText("100",null);
	CalcEdit1.InsertText("200",null);
	CalcEdit1.InsertText("SubTotal",null);
	CalcEdit1.InsertText("300",null);
	CalcEdit1.InsertText("400 * 1.5",null);
	CalcEdit1.InsertText("SubTotal",null);
	CalcEdit1.InsertText("Total",null);
}
</SCRIPT>
</BODY>

26
How can I change the color to show the numbers

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.FormatNumbers = "<fgcolor=FF0000> </fgcolor>";
	CalcEdit1.Text = "1 + 2 + 3 + 4";
}
</SCRIPT>
</BODY>

25
The numbers are shown in blue. How can I remove that

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.FormatNumbers = "";
	CalcEdit1.Text = "1 + 2 + 3 + 4";
}
</SCRIPT>
</BODY>

24
How can I export the entire text, including the result

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.Text = "100 * 1.5";
	CalcEdit1.InsertText("120 * 1.5",null);
	CalcEdit1.InsertText("130 * 1.5",null);
	CalcEdit1.InsertText("Total",null);
	alert( CalcEdit1.Export );
}
</SCRIPT>
</BODY>

23
Is it possible to display the result, using the current regional locale

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.DrawGridLines = true;
	CalcEdit1.FormatResult = " <fgcolor=808080>[=%l%]</fgcolor>";
	CalcEdit1.FormatTotalResult = " <b>[=%l%]</b>";
	CalcEdit1.InsertText("100 * 100",null);
	CalcEdit1.InsertText("200 * 200",null);
	CalcEdit1.InsertText("300 * 300",null);
	CalcEdit1.InsertText("Total",null);
}
</SCRIPT>
</BODY>

22
How can I change the format to display the total result (right)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.DrawGridLines = true;
	CalcEdit1.FormatTotalResult = "<b><fgcolor=FF0000> = %l%</fgcolor></b>";
	CalcEdit1.AllowTotal = "<b><fgcolor=00FF00>Total</fgcolor></b>";
	CalcEdit1.InsertText("100",null);
	CalcEdit1.InsertText("200",null);
	CalcEdit1.InsertText("300",null);
	CalcEdit1.InsertText("Total",null);
}
</SCRIPT>
</BODY>

21
How can I change the format to display the total result (right)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.DrawGridLines = true;
	CalcEdit1.LineHeight = "value  + 4 * dpi";
	CalcEdit1.FormatTotalResult = "<r><b><font ;12>%l%</font></b>";
	CalcEdit1.AllowTotal = "<b><font ;12>Total</font></b>";
	CalcEdit1.InsertText("100",null);
	CalcEdit1.InsertText("200",null);
	CalcEdit1.InsertText("300",null);
	CalcEdit1.InsertText("Total",null);
}
</SCRIPT>
</BODY>

20
Is it possible to rename the SubTotal

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.AllowSubTotal = "<fgcolor=FF0000>Current Amount";
	CalcEdit1.InsertText("100",null);
	CalcEdit1.InsertText("200",null);
	CalcEdit1.InsertText("Current Amount",null);
	CalcEdit1.InsertText("300",null);
	CalcEdit1.InsertText("400",null);
	CalcEdit1.InsertText("Current Amount",null);
	CalcEdit1.InsertText("Total",null);
}
</SCRIPT>
</BODY>

19
How can I disable the sub-totals

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.AllowSubTotal = "";
	CalcEdit1.InsertText("100",null);
	CalcEdit1.InsertText("200",null);
	CalcEdit1.InsertText("SubTotal",null);
	CalcEdit1.InsertText("300",null);
	CalcEdit1.InsertText("400",null);
	CalcEdit1.InsertText("SubTotal",null);
	CalcEdit1.InsertText("Total",null);
}
</SCRIPT>
</BODY>

18
How can I add sub-totals

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.AllowComments = "<fgcolor=008000>'";
	CalcEdit1.AddWildFormat("<i>*=*<fgcolor=008000>'*");
	CalcEdit1.AllowVariables = "=";
	CalcEdit1.DrawGridLines = true;
	CalcEdit1.LineHeight = "value + 8 * dpi";
	CalcEdit1.GridLineColor = 12895428;
	CalcEdit1.FormatLocal = "currency(value)";
	CalcEdit1.FormatTotalResult = "<r><b> = %l%</b>";
	CalcEdit1.FormatSubTotalResult = "<r><fgcolor=808080>[<b> = %l%</b>]";
	CalcEdit1.FormatResult = "<r><fgcolor=808080>(%l%)";
	CalcEdit1.BackColorTotal = 15790320;
	CalcEdit1.BackColorLockedLine = 0;
	CalcEdit1.ForeColorLockedLine = 0;
	CalcEdit1.CalcType = -1;
	CalcEdit1.Text = "100 + 200";
	CalcEdit1.InsertText("200 * 1.5",null);
	CalcEdit1.InsertText("SubA = SubTotal ' first subtotal",null);
	CalcEdit1.InsertText("300 + (200+300)/2",null);
	CalcEdit1.InsertText("400 + 500",null);
	CalcEdit1.InsertText("SubB = SubTotal ' second subtotal",null);
	CalcEdit1.InsertLockedText("VAT = Total * 0.19",null);
	CalcEdit1.InsertLockedText("Commision = Total * 0.05",null);
	CalcEdit1.InsertLockedText("NET = (Total - VAT) - Commision",null);
	CalcEdit1.InsertLockedText("Total",null);
}
</SCRIPT>
</BODY>

17
Is it possible to disable the Total

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.AllowTotal = "";
	CalcEdit1.MultiLine = true;
	CalcEdit1.InsertText("100",null);
	CalcEdit1.InsertText("200",null);
	CalcEdit1.InsertText("300",null);
	CalcEdit1.InsertText("Total",null);
}
</SCRIPT>
</BODY>

16
Is it possible to rename the Total to Sum

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.AllowTotal = "<fgcolor=FF0000><b>Sum</b></fgcolor>";
	CalcEdit1.MultiLine = true;
	CalcEdit1.InsertText("100",null);
	CalcEdit1.InsertText("200",null);
	CalcEdit1.InsertText("300",null);
	CalcEdit1.InsertText("Sum",null);
}
</SCRIPT>
</BODY>

15
Is it possible to add all lines

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.InsertText("100",null);
	CalcEdit1.InsertText("200",null);
	CalcEdit1.InsertText("300",null);
	CalcEdit1.InsertText("Total",null);
}
</SCRIPT>
</BODY>

14
How do I insert / add a new line

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.Text = "100 * 1.5";
	CalcEdit1.InsertText("120 * 2.5\\r\\n",1);
	CalcEdit1.InsertText("200 * 1.5",null);
}
</SCRIPT>
</BODY>

13
How do I find out if a specified line is valid

<BODY onload="Init()">
<SCRIPT FOR="CalcEdit1" EVENT="SelChange()" LANGUAGE="JScript">
	alert( "CurrentLine: " );
	alert( CalcEdit1.CaretLine );
	alert( "CurrentLine: " );
	alert( CalcEdit1.TextLine(CalcEdit1.CaretLine) );
	alert( "IsValid: " );
	alert( CalcEdit1.IsValid(CalcEdit1.CaretLine) );
</SCRIPT>

<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.Text = "100 * 1.5";
	CalcEdit1.InsertText("invalid",null);
	CalcEdit1.InsertText("120 * 1.5",null);
	CalcEdit1.InsertText("130 * 1.5",null);
}
</SCRIPT>
</BODY>

12
How do I get the current line

<BODY onload="Init()">
<SCRIPT FOR="CalcEdit1" EVENT="SelChange()" LANGUAGE="JScript">
	alert( "CurrentLine: " );
	alert( CalcEdit1.CaretLine );
	alert( "CurrentLine: " );
	alert( CalcEdit1.TextLine(CalcEdit1.CaretLine) );
	alert( "CurrentResult: " );
	alert( CalcEdit1.Result(CalcEdit1.CaretLine) );
</SCRIPT>

<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.Text = "100 * 1.5";
	CalcEdit1.InsertText("120 * 1.5",null);
	CalcEdit1.InsertText("130 * 1.5",null);
}
</SCRIPT>
</BODY>

11
How do I get the line one by one, including the result

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.Text = "100 * 1.5";
	CalcEdit1.InsertText("120 * 1.5",null);
	CalcEdit1.InsertText("130 * 1.5",null);
	alert( "Lines:" );
	alert( CalcEdit1.Count );
	alert( "TextLine(1):" );
	alert( CalcEdit1.TextLine(1) );
	alert( "Result(1)" );
	alert( CalcEdit1.Result(1) );
	alert( "TextLine(2):" );
	alert( CalcEdit1.TextLine(2) );
	alert( "Result(2)" );
	alert( CalcEdit1.Result(2) );
	alert( "TextLine(3):" );
	alert( CalcEdit1.TextLine(3) );
	alert( "Result(3)" );
	alert( CalcEdit1.Result(3) );
}
</SCRIPT>
</BODY>

10
Does the control supports multiple lines

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.MultiLine = true;
	CalcEdit1.Text = "100 * 1.5";
	CalcEdit1.InsertText("120 * 1.5",null);
	CalcEdit1.InsertText("130 * 1.5",null);
}
</SCRIPT>
</BODY>

9
Is it possible to display the result without brakets

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.FormatResult = "<fgcolor=808080> = %%</fgcolor>";
	CalcEdit1.Text = "12 + (12 / 100)/2";
}
</SCRIPT>
</BODY>

8
How can I display the result on the right side of the control

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.FormatResult = "<r> <fgcolor=808080>[=%%]</fgcolor>";
	CalcEdit1.Text = "12 + (12 / 100)/2";
}
</SCRIPT>
</BODY>

7
Can you please advise how to change fontname and size (sample 2)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.Template = "Font.Size = 20; Font.Name = `Tahoma`; Refresh";
	CalcEdit1.Text = "1/2";
}
</SCRIPT>
</BODY>

6
Can you please advise how to change fontname and size (sample 1)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.Font.Size = 20;
	CalcEdit1.Text = "1/2";
	CalcEdit1.Refresh();
}
</SCRIPT>
</BODY>

5
How can I disable evaluating the selection

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.EvaluateSel = false;
	CalcEdit1.HideSelection = false;
	CalcEdit1.Text = "(1+6.25)/4*6/3";
	CalcEdit1.SelStart = 1;
	CalcEdit1.SelLength = 6;
	CalcEdit1.SelBackColor = 0;
}
</SCRIPT>
</BODY>

4
Can I define a different decimal separator

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.AddDecimalSep = ",";
	CalcEdit1.Text = "(1+6,25)/4*6/3";
}
</SCRIPT>
</BODY>

3
How do I change the color of the entire control, if the expression is not valid

<BODY onload="Init()">
<SCRIPT FOR="CalcEdit1" EVENT="Change()" LANGUAGE="JScript">
	alert( "Valid:" );
	alert( CalcEdit1.IsValid(null) );
	CalcEdit1.ForeColor = 255;
	CalcEdit1.FormatNumbers = "<fgcolor FF0000>";
	CalcEdit1.FormatResult = "";
</SCRIPT>

<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.FormatInvalid = "";
	CalcEdit1.Text = "invalid(1+6.25)/4*6/3";
}
</SCRIPT>
</BODY>

2
Is there any function to know if the expression is valid

<BODY onload="Init()">
<SCRIPT FOR="CalcEdit1" EVENT="Change()" LANGUAGE="JScript">
	alert( "Valid:" );
	alert( CalcEdit1.IsValid(null) );
	alert( "Expression: " );
	alert( CalcEdit1.Text );
	alert( "Result: " );
	alert( CalcEdit1.Result(null) );
</SCRIPT>

<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.Text = "(1+6.25)/4*6/3";
}
</SCRIPT>
</BODY>

1
How do I programatically save / load the expression and the result

<BODY onload="Init()">
<OBJECT CLASSID="clsid:0D4EE794-3E13-4226-81F9-499EE6EDCCF7" id="CalcEdit1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	CalcEdit1.Text = "(1+6.25)/4*6/3";
	alert( "Expression: " );
	alert( CalcEdit1.Text );
	alert( "Result: " );
	alert( CalcEdit1.Result(null) );
}
</SCRIPT>
</BODY>