78
|
Is it possible to change the line's height

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.Text("(1+6.25)/4*6/3");
excalcedit1.InsertText("(2+6.25)/4*6/3\\r\\n",COMVariant::createFromInt(1));
excalcedit1.InsertText("(3+6.25)/4*6/3\\r\\n",COMVariant::createFromInt(1));
excalcedit1.InsertText("(4+6.25)/4*6/3\\r\\n",COMVariant::createFromInt(1));
excalcedit1.InsertText("Total");
excalcedit1.LineHeight("value + 8 * dpi");
excalcedit1.DrawGridLines(true);
}
|
77
|
How do I put a picture on the control's background

public void init()
{
;
super();
excalcedit1.Picture(excalcedit1.ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)"));
excalcedit1.PictureDisplay(0/*exUpperLeft*/);
excalcedit1.MultiLine(true);
excalcedit1.Text("(1+6.25)/4*6/3");
excalcedit1.InsertText("\\r\\n",COMVariant::createFromInt(1));
excalcedit1.InsertText("\\r\\n",COMVariant::createFromInt(1));
excalcedit1.InsertText("\\r\\n",COMVariant::createFromInt(1));
print( "Expression: " );
print( excalcedit1.Text() );
print( "Result: " );
print( excalcedit1.Result() );
}
|
76
|
How do I get the numbers only, with no Total fields (method 2)

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.FormatResult("<fgcolor=808080><r> = %%");
excalcedit1.InsertText("100 * 200");
excalcedit1.InsertText("300 * 400 * 1.5");
excalcedit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)");
excalcedit1.InsertText("Total");
print( excalcedit1.ExecuteTemplate("FormatABC(\"lower(A) replace `total` with ``\", Text)") );
}
|
75
|
How do I get the numbers only, with no Total fields (method 1)

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.FormatResult("<fgcolor=808080><r> = %%");
excalcedit1.InsertText("100 * 200");
excalcedit1.InsertText("300 * 400 * 1.5");
excalcedit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)");
excalcedit1.InsertText("Total");
print( excalcedit1.FormatABC("lower(A) replace `total` with ``",COMVariant::createFromStr(excalcedit1.Text())) );
}
|
74
|
How do I customize the format to display the result (right,local,2 decimals,less,font)

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.LineHeight("value + 8 * dpi");
excalcedit1.FormatLocal("( value < 10000 ? `<fgcolor=000000><b><font ;16>` : ``) + (value format `2`)");
excalcedit1.FormatResult("<fgcolor=808080><r> = %l%");
excalcedit1.InsertText("100 * 200");
excalcedit1.InsertText("300 * 400 * 1.5");
excalcedit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)");
}
|
73
|
How do I customize the format to display the result (right,local,2 decimals,greater,color)

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.FormatLocal("( value > 10000 ? `<fgcolor=FF0000><b>` : ``) + (value format `2`)");
excalcedit1.FormatResult("<fgcolor=808080><r> = %l%");
excalcedit1.InsertText("100 * 200");
excalcedit1.InsertText("300 * 400 * 1.5");
excalcedit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)");
}
|
72
|
How do I customize the format to display the result (right,local,all decimals)

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.FormatLocal("value");
excalcedit1.FormatResult("<fgcolor=808080><r> = %l%");
excalcedit1.InsertText("100 * 200");
excalcedit1.InsertText("300 * 400 * 1.5");
excalcedit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)");
}
|
71
|
How do I customize the format to display the result (right,local,2 decimals)

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.FormatLocal("value format `2`");
excalcedit1.FormatResult("<fgcolor=808080><r> = %l%");
excalcedit1.InsertText("100 * 200");
excalcedit1.InsertText("300 * 400 * 1.5");
excalcedit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)");
}
|
70
|
How do I customize the format to display the result (right,local,curency)

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.FormatLocal("currency(value)");
excalcedit1.FormatResult("<fgcolor=808080><r> = %l%");
excalcedit1.InsertText("100 * 200");
excalcedit1.InsertText("300 * 400 * 1.5");
excalcedit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)");
}
|
69
|
How do I customize the format to display the result (right,local)

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.FormatResult("<fgcolor=808080><r> = %l%");
excalcedit1.InsertText("100 * 200");
excalcedit1.InsertText("300 * 400 * 1.5");
excalcedit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)");
}
|
68
|
How do I customize the format to display the result (right)

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.FormatResult("<fgcolor=808080><r> = %%");
excalcedit1.InsertText("100 * 200");
excalcedit1.InsertText("300 * 400 * 1.5");
excalcedit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)");
}
|
67
|
How do I customize the format to display the result (default)

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.InsertText("100 * 200");
excalcedit1.InsertText("300 * 400 * 1.5");
excalcedit1.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)");
}
|
66
|
How can I force a line to be there all the time, so user can not delete it, for instance Total

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.InsertLockedText("Total");
excalcedit1.InsertText("100");
excalcedit1.InsertText("200");
excalcedit1.InsertText("300");
}
|
65
|
Is it possible to get the value of specified variable

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.InsertText("100");
excalcedit1.InsertText("200");
excalcedit1.InsertText("300");
excalcedit1.InsertText("TVA = Total * 0.19");
excalcedit1.InsertText("Total");
print( "The TVA is: " );
print( excalcedit1.Variable("TVA") );
}
|
64
|
How do I get the total

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.InsertText("100");
excalcedit1.InsertText("200");
excalcedit1.InsertText("300");
excalcedit1.InsertText("Total");
print( "The total is: " );
print( excalcedit1.Variable("Total") );
}
|
63
|
How do I get the easter date

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.CalcType(-1/*exCalcIncludeAll*/);
excalcedit1.ClearWildFormats();
excalcedit1.FormatResult("<r><fgcolor=008000><b>(%%)");
excalcedit1.AllowComments("<fgcolor=008000>//");
excalcedit1.AddWildFormat("*=*<fgcolor=008000>//*");
excalcedit1.AddWildFormat("<fgcolor=808080>V*=*");
excalcedit1.AddWildFormat("<b>EasterSundayDay*=*");
excalcedit1.BackColorLockedLine(WinApi::RGB2int(0,0,0));
excalcedit1.ForeColorLockedLine(WinApi::RGB2int(0,0,0));
excalcedit1.Text("Year = 2018 // change here the year, to get the Easter Sunday for giving year");
excalcedit1.InsertLockedText("V1 = (((255 - 11 * (Year mod 19)) - 21) mod 30)");
excalcedit1.InsertLockedText("V2 = ((V1 + 21) + (V1 > 48 ? -1 : 0) + 6 - ((Year + int(Year / 4)) + V1 + (V1 > 48 ? -1 : 0) + 1) mod 7)");
excalcedit1.InsertLockedText("EasterSundayDay = date(dateS('3/1/' + Year) + V2)");
print( "Easter Sunday Day is " );
print( excalcedit1.Variable("EasterSundayDay") );
print( " for year " );
print( excalcedit1.Variable("Year") );
}
|
62
|
I've got a red line while I type into the control. How can I disable that (sample 2)

public void init()
{
;
super();
excalcedit1.AllowFormatInvalidOnTyping(false);
excalcedit1.MultiLine(true);
excalcedit1.Text("100 + 200(invalid)");
}
|
61
|
I've got a red line while I type into the control. How can I disable that (sample 1)

public void init()
{
;
super();
excalcedit1.FormatInvalid("");
excalcedit1.Text("100 + 200(invalid)");
}
|
60
|
How do I specify the color to show the locked lines

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.AllowVariables("=");
excalcedit1.DrawGridLines(true);
excalcedit1.LineHeight("value + 8 * dpi");
excalcedit1.GridLineColor(WinApi::RGB2int(196,196,196));
excalcedit1.FormatResult("<r>[=%l%]");
excalcedit1.FormatLocal("currency(value)");
excalcedit1.FormatTotalResult("<r><b> <fgcolor=FFFFFF>= %l%</b>");
excalcedit1.BackColorLockedLine(WinApi::RGB2int(0,0,1));
excalcedit1.ForeColorLockedLine(WinApi::RGB2int(255,255,255));
excalcedit1.InsertText("100");
excalcedit1.InsertText("200");
excalcedit1.InsertLockedText("VAT = Total * 0.20");
excalcedit1.InsertLockedText("Total");
}
|
59
|
Can I remove the colors that indicates locked lines

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.AllowVariables("=");
excalcedit1.DrawGridLines(true);
excalcedit1.LineHeight("value + 8 * dpi");
excalcedit1.GridLineColor(WinApi::RGB2int(196,196,196));
excalcedit1.FormatResult("<r><fgcolor=808080>[=%l%]");
excalcedit1.FormatLocal("currency(value)");
excalcedit1.FormatTotalResult("<r><b> = %l%</b>");
excalcedit1.BackColorLockedLine(WinApi::RGB2int(0,0,0));
excalcedit1.ForeColorLockedLine(WinApi::RGB2int(0,0,0));
excalcedit1.InsertText("100");
excalcedit1.InsertText("200");
excalcedit1.InsertLockedText("VAT = Total * 0.20");
excalcedit1.InsertLockedText("Total");
}
|
58
|
Can I add lines to the control, so the user can not remove/delete them ( locked lines )

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.CalcType(-1/*exCalcIncludeAll*/);
excalcedit1.AllowVariables("=");
excalcedit1.DrawGridLines(true);
excalcedit1.LineHeight("value + 8 * dpi");
excalcedit1.GridLineColor(WinApi::RGB2int(196,196,196));
excalcedit1.FormatResult("<r><fgcolor=808080>[=%l%]");
excalcedit1.FormatLocal("currency(value)");
excalcedit1.FormatTotalResult("<r><b> = %l%</b>");
excalcedit1.Text("1000");
excalcedit1.InsertText("2000");
excalcedit1.InsertLockedText("Commission = Total * 0.05 + (Total ? 2.95 : 0)");
excalcedit1.InsertLockedText("Total");
}
|
57
|
Is it possible to highlight a specified line

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.AllowVariables("=");
excalcedit1.DrawGridLines(true);
excalcedit1.LineHeight("value + 8 * dpi");
excalcedit1.GridLineColor(WinApi::RGB2int(196,196,196));
excalcedit1.FormatResult("<r><fgcolor=808080>[=%l%]");
excalcedit1.FormatLocal("currency(value)");
excalcedit1.FormatTotalResult("<r><b> = %l%</b>");
excalcedit1.AddWildFormat("<fgcolor=00FF00>*<b>Commission</b>*=*");
excalcedit1.Text("100.50 + 123");
excalcedit1.InsertText("200 + 20/5");
excalcedit1.InsertText("300 + 3 * 15");
excalcedit1.InsertText("400 + 200 * (10 + 12/45)");
excalcedit1.InsertText("50 * 45");
excalcedit1.InsertText("VAT = Total * 0.19");
excalcedit1.InsertText("NET = Total - VAT");
excalcedit1.InsertText("Monthly = Total / 12");
excalcedit1.InsertText("Commission = Total * 0.05 + 2.95");
excalcedit1.InsertText("Total");
}
|
56
|
Is it possible to display the result as currency

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.AllowVariables("=");
excalcedit1.DrawGridLines(true);
excalcedit1.LineHeight("value + 8 * dpi");
excalcedit1.GridLineColor(WinApi::RGB2int(196,196,196));
excalcedit1.FormatLocal("currency(value)");
excalcedit1.FormatTotalResult("<r><b> = %l%</b>");
excalcedit1.BackColorTotal(WinApi::RGB2int(240,240,240));
excalcedit1.Text("100.50");
excalcedit1.InsertText("200");
excalcedit1.InsertText("300");
excalcedit1.InsertText("400");
excalcedit1.InsertText("VAT = Total * 0.19");
excalcedit1.InsertText("NET = Total - VAT");
excalcedit1.InsertText("Total");
}
|
55
|
Is it possible to display the result with no decimals

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.AllowVariables("=");
excalcedit1.DrawGridLines(true);
excalcedit1.LineHeight("value + 8 * dpi");
excalcedit1.GridLineColor(WinApi::RGB2int(196,196,196));
excalcedit1.FormatLocal("value format `0`");
excalcedit1.FormatTotalResult("<r><b> = %l%</b>");
excalcedit1.BackColorTotal(WinApi::RGB2int(240,240,240));
excalcedit1.Text("100.50");
excalcedit1.InsertText("200");
excalcedit1.InsertText("300");
excalcedit1.InsertText("400");
excalcedit1.InsertText("VAT = Total * 0.19");
excalcedit1.InsertText("NET = Total - VAT");
excalcedit1.InsertText("Total");
}
|
54
|
Is it possible to display the result exactly how it is defined in the control panel

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.AllowVariables("=");
excalcedit1.DrawGridLines(true);
excalcedit1.LineHeight("value + 8 * dpi");
excalcedit1.GridLineColor(WinApi::RGB2int(196,196,196));
excalcedit1.FormatLocal("value format ``");
excalcedit1.FormatTotalResult("<r><b> = %l%</b>");
excalcedit1.BackColorTotal(WinApi::RGB2int(240,240,240));
excalcedit1.Text("100.50");
excalcedit1.InsertText("200");
excalcedit1.InsertText("300");
excalcedit1.InsertText("400");
excalcedit1.InsertText("VAT = Total * 0.19");
excalcedit1.InsertText("NET = Total - VAT");
excalcedit1.InsertText("Total");
}
|
53
|
How can I count the lines

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.AllowCount("count");
excalcedit1.AllowSubCount("subcount");
excalcedit1.DrawGridLines(true);
excalcedit1.LineHeight("value + 8 * dpi");
excalcedit1.GridLineColor(WinApi::RGB2int(196,196,196));
excalcedit1.InsertText("100");
excalcedit1.InsertText("200");
excalcedit1.InsertText("SubCount");
excalcedit1.InsertText("300");
excalcedit1.InsertText("400");
excalcedit1.InsertText("500");
excalcedit1.InsertText("SubCount");
excalcedit1.InsertText("Count");
}
|
52
|
How can I compute the average
public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.AllowVariables("=");
excalcedit1.DrawGridLines(true);
excalcedit1.LineHeight("value + 8 * dpi");
excalcedit1.GridLineColor(WinApi::RGB2int(196,196,196));
excalcedit1.FormatTotalResult("<r><b> = %l%</b>");
excalcedit1.BackColorTotal(WinApi::RGB2int(240,240,240));
excalcedit1.Text("Average = Total / Count");
excalcedit1.InsertText("100");
excalcedit1.InsertText("200");
excalcedit1.InsertText("300");
excalcedit1.InsertText("400");
excalcedit1.InsertText("VAT = Total * 0.19");
excalcedit1.InsertText("NET = Total - VAT");
excalcedit1.InsertText("Total");
}
|
51
|
Variables or Computed Fields

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.AllowVariables("=");
excalcedit1.DrawGridLines(true);
excalcedit1.LineHeight("value + 8 * dpi");
excalcedit1.GridLineColor(WinApi::RGB2int(196,196,196));
excalcedit1.FormatTotalResult("<r><b> = %l%</b>");
excalcedit1.BackColorTotal(WinApi::RGB2int(240,240,240));
excalcedit1.Text("100");
excalcedit1.InsertText("200");
excalcedit1.InsertText("300");
excalcedit1.InsertText("400");
excalcedit1.InsertText("VAT = Total * 0.19");
excalcedit1.InsertText("NET = Total - VAT");
excalcedit1.InsertText("Total");
}
|
50
|
I have noticed that definition of the variable is shown in italics. Can I change that

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.AllowVariables("=");
excalcedit1.ClearWildFormats();
excalcedit1.AddWildFormat("<b>*=*");
excalcedit1.Text("A = 400");
excalcedit1.InsertText("");
excalcedit1.InsertText("B = A + 0.22");
excalcedit1.InsertText("A + B");
excalcedit1.InsertText("B = B * .19");
excalcedit1.InsertText("A + B");
}
|
49
|
I have noticed that definition of the variable is shown in italics. Can I remove that

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.AllowVariables("=");
excalcedit1.ClearWildFormats();
excalcedit1.Text("A = 300");
excalcedit1.InsertText("");
excalcedit1.InsertText("B = A + 0.22");
excalcedit1.InsertText("A + B");
excalcedit1.InsertText("B = B * .19");
excalcedit1.InsertText("A + B");
}
|
48
|
Can I define variables (sample 2)

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.AllowVariables("is");
excalcedit1.ClearWildFormats();
excalcedit1.AddWildFormat("<b>*is*");
excalcedit1.Text("A is 200");
excalcedit1.InsertText("");
excalcedit1.InsertText("B is A + 0.22");
excalcedit1.InsertText("A + B");
excalcedit1.InsertText("B is B * .19");
excalcedit1.InsertText("A + B");
}
|
47
|
Can I define variables (sample 1)

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.AllowVariables("=");
excalcedit1.Text("A = 100.22");
excalcedit1.InsertText("");
excalcedit1.InsertText("B = A + 0.22");
excalcedit1.InsertText("A + B");
excalcedit1.InsertText("B = B * .19");
excalcedit1.InsertText("A + B");
}
|
46
|
Comments and Prefixes

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.AllowPrefixes("<fgcolor=808080>:</fgcolor>");
excalcedit1.AllowComments("<fgcolor=008080>'</fgcolor>");
excalcedit1.Text("Field A: 100 ' this is the field A");
excalcedit1.InsertText("Field B: 200 ' this is the field B");
excalcedit1.InsertText("Total");
}
|
45
|
Can I display something at the start of each line

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.AllowPrefixes("<b>:</b>");
excalcedit1.Text("Field A: 100");
excalcedit1.InsertText("Field B: 200");
excalcedit1.InsertText("Total");
}
|
44
|
I can not use TAB key. Is it possible
public void init()
{
;
super();
excalcedit1.UseTabKey(true);
}
|
43
|
Does your control support comments

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.CalcType(-1/*exCalcIncludeAll*/);
excalcedit1.AllowComments("<fgcolor=008080>//</fgcolor>");
excalcedit1.Text("104 mod 51 // modulo function");
excalcedit1.InsertText("int(104/51) // int function");
excalcedit1.InsertText("51 * int(104/51) + (104 mod 51) // check");
}
|
42
|
Can I use the modulo function ( rest )

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.CalcType(-1/*exCalcIncludeAll*/);
excalcedit1.Text("104 mod 51");
excalcedit1.InsertText("int(104/51)");
excalcedit1.InsertText("51 * int(104/51) + (104 mod 51)");
}
|
41
|
Can I use acos function

public void init()
{
;
super();
excalcedit1.CalcType(-1/*exCalcIncludeAll*/);
excalcedit1.Text("acos(cos(1))");
}
|
40
|
Can I use asin function

public void init()
{
;
super();
excalcedit1.CalcType(-1/*exCalcIncludeAll*/);
excalcedit1.Text("asin(sin(1))");
}
|
39
|
Can I use cos function

public void init()
{
;
super();
excalcedit1.CalcType(-1/*exCalcIncludeAll*/);
excalcedit1.Text("cos(1)");
}
|
38
|
Can I use sin function

public void init()
{
;
super();
excalcedit1.CalcType(-1/*exCalcIncludeAll*/);
excalcedit1.Text("sin(1)");
}
|
37
|
Can I use abs function (absolute part of the number)

public void init()
{
;
super();
excalcedit1.CalcType(-1/*exCalcIncludeAll*/);
excalcedit1.Text("abs(-100.99)");
}
|
36
|
Can I use round function

public void init()
{
;
super();
excalcedit1.CalcType(-1/*exCalcIncludeAll*/);
excalcedit1.Text("round(100.99)");
}
|
35
|
Can I use int function (integer part of a number)

public void init()
{
;
super();
excalcedit1.CalcType(-1/*exCalcIncludeAll*/);
excalcedit1.Text("int(100.99)");
}
|
34
|
Can I use sqrt function (square root of a number)

public void init()
{
;
super();
excalcedit1.CalcType(-1/*exCalcIncludeAll*/);
excalcedit1.Text("sqrt(100)");
}
|
33
|
How can I show invalid lines with a larger font

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.LineHeight("value + 8 *dpi");
excalcedit1.DrawGridLines(true);
excalcedit1.FormatInvalid("<u><font ;12> </font></u>");
excalcedit1.InsertText("100");
excalcedit1.InsertText("k200");
excalcedit1.InsertText("300");
}
|
32
|
I've noticed that while I type the text is shown in red. How can I change that

public void init()
{
;
super();
excalcedit1.FormatInvalid("");
excalcedit1.Text("100 * 200");
}
|
31
|
Can I enlarge the height of each line

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.LineHeight("value + 8 * dpi");
excalcedit1.DrawGridLines(true);
excalcedit1.InsertText("100");
excalcedit1.InsertText("200");
excalcedit1.InsertText("300");
excalcedit1.InsertText("Total");
}
|
30
|
How can I show grid lines

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.DrawGridLines(true);
excalcedit1.GridLineColor(WinApi::RGB2int(0,0,0));
excalcedit1.InsertText("100");
excalcedit1.InsertText("200");
excalcedit1.InsertText("300");
excalcedit1.InsertText("Total");
}
|
29
|
How can I display the result of the total with a larger font

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.DrawGridLines(true);
excalcedit1.LineHeight("value + 8 * dpi");
excalcedit1.FormatTotalResult("<r><b><font ;14>%l%</font></b>");
excalcedit1.AllowTotal("<b><font ;14>Total</font></b>");
excalcedit1.InsertText("100");
excalcedit1.InsertText("200");
excalcedit1.InsertText("300");
excalcedit1.InsertText("Total");
}
|
28
|
Is it possible to show the Total / SubTotal with a different background color

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.AllowTotal("<bgcolor=A0A0A0><b>Total</b></bgcolor>");
excalcedit1.AllowSubTotal("<bgcolor=E0E0E0><b>SubTotal</b></bgcolor>");
excalcedit1.InsertText("100");
excalcedit1.InsertText("200");
excalcedit1.InsertText("SubTotal");
excalcedit1.InsertText("300");
excalcedit1.InsertText("400 * 1.5");
excalcedit1.InsertText("SubTotal");
excalcedit1.InsertText("Total");
}
|
27
|
Is it possible to show the Total / SubTotal with a different background color

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.BackColorTotal(WinApi::RGB2int(196,196,196));
excalcedit1.BackColorSubTotal(WinApi::RGB2int(240,240,240));
excalcedit1.InsertText("100");
excalcedit1.InsertText("200");
excalcedit1.InsertText("SubTotal");
excalcedit1.InsertText("300");
excalcedit1.InsertText("400 * 1.5");
excalcedit1.InsertText("SubTotal");
excalcedit1.InsertText("Total");
}
|
26
|
How can I change the color to show the numbers

public void init()
{
;
super();
excalcedit1.FormatNumbers("<fgcolor=FF0000> </fgcolor>");
excalcedit1.Text("1 + 2 + 3 + 4");
}
|
25
|
The numbers are shown in blue. How can I remove that

public void init()
{
;
super();
excalcedit1.FormatNumbers("");
excalcedit1.Text("1 + 2 + 3 + 4");
}
|
24
|
How can I export the entire text, including the result

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.Text("100 * 1.5");
excalcedit1.InsertText("120 * 1.5");
excalcedit1.InsertText("130 * 1.5");
excalcedit1.InsertText("Total");
print( excalcedit1.Export() );
}
|
23
|
Is it possible to display the result, using the current regional locale

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.DrawGridLines(true);
excalcedit1.FormatResult(" <fgcolor=808080>[=%l%]</fgcolor>");
excalcedit1.FormatTotalResult(" <b>[=%l%]</b>");
excalcedit1.InsertText("100 * 100");
excalcedit1.InsertText("200 * 200");
excalcedit1.InsertText("300 * 300");
excalcedit1.InsertText("Total");
}
|
22
|
How can I change the format to display the total result (right)

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.DrawGridLines(true);
excalcedit1.FormatTotalResult("<b><fgcolor=FF0000> = %l%</fgcolor></b>");
excalcedit1.AllowTotal("<b><fgcolor=00FF00>Total</fgcolor></b>");
excalcedit1.InsertText("100");
excalcedit1.InsertText("200");
excalcedit1.InsertText("300");
excalcedit1.InsertText("Total");
}
|
21
|
How can I change the format to display the total result (right)

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.DrawGridLines(true);
excalcedit1.LineHeight("value + 4 * dpi");
excalcedit1.FormatTotalResult("<r><b><font ;12>%l%</font></b>");
excalcedit1.AllowTotal("<b><font ;12>Total</font></b>");
excalcedit1.InsertText("100");
excalcedit1.InsertText("200");
excalcedit1.InsertText("300");
excalcedit1.InsertText("Total");
}
|
20
|
Is it possible to rename the SubTotal

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.AllowSubTotal("<fgcolor=FF0000>Current Amount");
excalcedit1.InsertText("100");
excalcedit1.InsertText("200");
excalcedit1.InsertText("Current Amount");
excalcedit1.InsertText("300");
excalcedit1.InsertText("400");
excalcedit1.InsertText("Current Amount");
excalcedit1.InsertText("Total");
}
|
19
|
How can I disable the sub-totals

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.AllowSubTotal("");
excalcedit1.InsertText("100");
excalcedit1.InsertText("200");
excalcedit1.InsertText("SubTotal");
excalcedit1.InsertText("300");
excalcedit1.InsertText("400");
excalcedit1.InsertText("SubTotal");
excalcedit1.InsertText("Total");
}
|
18
|
How can I add sub-totals

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.AllowComments("<fgcolor=008000>'");
excalcedit1.AddWildFormat("<i>*=*<fgcolor=008000>'*");
excalcedit1.AllowVariables("=");
excalcedit1.DrawGridLines(true);
excalcedit1.LineHeight("value + 8 * dpi");
excalcedit1.GridLineColor(WinApi::RGB2int(196,196,196));
excalcedit1.FormatLocal("currency(value)");
excalcedit1.FormatTotalResult("<r><b> = %l%</b>");
excalcedit1.FormatSubTotalResult("<r><fgcolor=808080>[<b> = %l%</b>]");
excalcedit1.FormatResult("<r><fgcolor=808080>(%l%)");
excalcedit1.BackColorTotal(WinApi::RGB2int(240,240,240));
excalcedit1.BackColorLockedLine(WinApi::RGB2int(0,0,0));
excalcedit1.ForeColorLockedLine(WinApi::RGB2int(0,0,0));
excalcedit1.CalcType(-1/*exCalcIncludeAll*/);
excalcedit1.Text("100 + 200");
excalcedit1.InsertText("200 * 1.5");
excalcedit1.InsertText("SubA = SubTotal ' first subtotal");
excalcedit1.InsertText("300 + (200+300)/2");
excalcedit1.InsertText("400 + 500");
excalcedit1.InsertText("SubB = SubTotal ' second subtotal");
excalcedit1.InsertLockedText("VAT = Total * 0.19");
excalcedit1.InsertLockedText("Commision = Total * 0.05");
excalcedit1.InsertLockedText("NET = (Total - VAT) - Commision");
excalcedit1.InsertLockedText("Total");
}
|
17
|
Is it possible to disable the Total

public void init()
{
;
super();
excalcedit1.AllowTotal("");
excalcedit1.MultiLine(true);
excalcedit1.InsertText("100");
excalcedit1.InsertText("200");
excalcedit1.InsertText("300");
excalcedit1.InsertText("Total");
}
|
16
|
Is it possible to rename the Total to Sum

public void init()
{
;
super();
excalcedit1.AllowTotal("<fgcolor=FF0000><b>Sum</b></fgcolor>");
excalcedit1.MultiLine(true);
excalcedit1.InsertText("100");
excalcedit1.InsertText("200");
excalcedit1.InsertText("300");
excalcedit1.InsertText("Sum");
}
|
15
|
Is it possible to add all lines

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.InsertText("100");
excalcedit1.InsertText("200");
excalcedit1.InsertText("300");
excalcedit1.InsertText("Total");
}
|
14
|
How do I insert / add a new line

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.Text("100 * 1.5");
excalcedit1.InsertText("120 * 2.5\\r\\n",COMVariant::createFromInt(1));
excalcedit1.InsertText("200 * 1.5");
}
|
13
|
How do I find out if a specified line is valid

// SelChange event - Occurs when the user selects text in the control.
void onEvent_SelChange()
{
;
print( "CurrentLine: " );
print( excalcedit1.CaretLine() );
print( "CurrentLine: " );
print( excalcedit1.TextLine(excalcedit1.CaretLine()) );
print( "IsValid: " );
print( excalcedit1.IsValid(excalcedit1.CaretLine()) );
}
public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.Text("100 * 1.5");
excalcedit1.InsertText("invalid");
excalcedit1.InsertText("120 * 1.5");
excalcedit1.InsertText("130 * 1.5");
}
|
12
|
How do I get the current line

// SelChange event - Occurs when the user selects text in the control.
void onEvent_SelChange()
{
;
print( "CurrentLine: " );
print( excalcedit1.CaretLine() );
print( "CurrentLine: " );
print( excalcedit1.TextLine(excalcedit1.CaretLine()) );
print( "CurrentResult: " );
print( excalcedit1.Result(excalcedit1.CaretLine()) );
}
public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.Text("100 * 1.5");
excalcedit1.InsertText("120 * 1.5");
excalcedit1.InsertText("130 * 1.5");
}
|
11
|
How do I get the line one by one, including the result

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.Text("100 * 1.5");
excalcedit1.InsertText("120 * 1.5");
excalcedit1.InsertText("130 * 1.5");
print( "Lines:" );
print( excalcedit1.Count() );
print( "TextLine(1):" );
print( excalcedit1.TextLine(1) );
print( "Result(1)" );
print( excalcedit1.Result(COMVariant::createFromInt(1)) );
print( "TextLine(2):" );
print( excalcedit1.TextLine(2) );
print( "Result(2)" );
print( excalcedit1.Result(COMVariant::createFromInt(2)) );
print( "TextLine(3):" );
print( excalcedit1.TextLine(3) );
print( "Result(3)" );
print( excalcedit1.Result(COMVariant::createFromInt(3)) );
}
|
10
|
Does the control supports multiple lines

public void init()
{
;
super();
excalcedit1.MultiLine(true);
excalcedit1.Text("100 * 1.5");
excalcedit1.InsertText("120 * 1.5");
excalcedit1.InsertText("130 * 1.5");
}
|
9
|
Is it possible to display the result without brakets

public void init()
{
;
super();
excalcedit1.FormatResult("<fgcolor=808080> = %%</fgcolor>");
excalcedit1.Text("12 + (12 / 100)/2");
}
|
8
|
How can I display the result on the right side of the control

public void init()
{
;
super();
excalcedit1.FormatResult("<r> <fgcolor=808080>[=%%]</fgcolor>");
excalcedit1.Text("12 + (12 / 100)/2");
}
|
7
|
Can you please advise how to change fontname and size (sample 2)

public void init()
{
;
super();
excalcedit1.Template("Font.Size = 20; Font.Name = `Tahoma`; Refresh");
excalcedit1.Text("1/2");
}
|
6
|
Can you please advise how to change fontname and size (sample 1)

public void init()
{
;
super();
excalcedit1.Font().Size(20);
excalcedit1.Text("1/2");
excalcedit1.Refresh();
}
|
5
|
How can I disable evaluating the selection

public void init()
{
;
super();
excalcedit1.EvaluateSel(false);
excalcedit1.HideSelection(false);
excalcedit1.Text("(1+6.25)/4*6/3");
excalcedit1.SelStart(1);
excalcedit1.SelLength(6);
excalcedit1.SelBackColor(WinApi::RGB2int(0,0,0));
}
|
4
|
Can I define a different decimal separator

public void init()
{
;
super();
excalcedit1.AddDecimalSep(",");
excalcedit1.Text("(1+6,25)/4*6/3");
}
|
3
|
How do I change the color of the entire control, if the expression is not valid

// Change event - Indicates that the control's text has changed.
void onEvent_Change()
{
;
print( "Valid:" );
print( excalcedit1.IsValid() );
excalcedit1.ForeColor(WinApi::RGB2int(255,0,0));
excalcedit1.FormatNumbers("<fgcolor FF0000>");
excalcedit1.FormatResult("");
}
public void init()
{
;
super();
excalcedit1.FormatInvalid("");
excalcedit1.Text("invalid(1+6.25)/4*6/3");
}
|
2
|
Is there any function to know if the expression is valid

// Change event - Indicates that the control's text has changed.
void onEvent_Change()
{
;
print( "Valid:" );
print( excalcedit1.IsValid() );
print( "Expression: " );
print( excalcedit1.Text() );
print( "Result: " );
print( excalcedit1.Result() );
}
public void init()
{
;
super();
excalcedit1.Text("(1+6.25)/4*6/3");
}
|
1
|
How do I programatically save / load the expression and the result

public void init()
{
;
super();
excalcedit1.Text("(1+6.25)/4*6/3");
print( "Expression: " );
print( excalcedit1.Text() );
print( "Result: " );
print( excalcedit1.Result() );
}
|