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

CalcEdit1->MultiLine = true;
CalcEdit1->Text = L"(1+6.25)/4*6/3";
CalcEdit1->InsertText(L"(2+6.25)/4*6/3\\r\\n",TVariant(1));
CalcEdit1->InsertText(L"(3+6.25)/4*6/3\\r\\n",TVariant(1));
CalcEdit1->InsertText(L"(4+6.25)/4*6/3\\r\\n",TVariant(1));
CalcEdit1->InsertText(L"Total",TNoParam());
CalcEdit1->LineHeight = L"value + 8 * dpi";
CalcEdit1->DrawGridLines = true;
|
77
|
How do I put a picture on the control's background

CalcEdit1->Picture = (IPictureDisp*)(CalcEdit1->ExecuteTemplate("loadpicture(`c:\\exontrol\\images\\zipdisk.gif`)"));
CalcEdit1->PictureDisplay = Excalceditlib_tlb::PictureDisplayEnum::exUpperLeft;
CalcEdit1->MultiLine = true;
CalcEdit1->Text = L"(1+6.25)/4*6/3";
CalcEdit1->InsertText(L"\\r\\n",TVariant(1));
CalcEdit1->InsertText(L"\\r\\n",TVariant(1));
CalcEdit1->InsertText(L"\\r\\n",TVariant(1));
OutputDebugString( L"Expression: " );
OutputDebugString( CalcEdit1->Text );
OutputDebugString( L"Result: " );
OutputDebugString( PChar(CalcEdit1->Result[TNoParam()]) );
|
76
|
How do I get the numbers only, with no Total fields (method 2)

CalcEdit1->MultiLine = true;
CalcEdit1->FormatResult = L"<fgcolor=808080><r> = %%";
CalcEdit1->InsertText(L"100 * 200",TNoParam());
CalcEdit1->InsertText(L"300 * 400 * 1.5",TNoParam());
CalcEdit1->InsertText(L"200 + ( 400 * 1.5 + 300 / 1.19)",TNoParam());
CalcEdit1->InsertText(L"Total",TNoParam());
OutputDebugString( PChar(CalcEdit1->ExecuteTemplate(L"FormatABC(\"lower(A) replace `total` with ``\", Text)")) );
|
75
|
How do I get the numbers only, with no Total fields (method 1)

CalcEdit1->MultiLine = true;
CalcEdit1->FormatResult = L"<fgcolor=808080><r> = %%";
CalcEdit1->InsertText(L"100 * 200",TNoParam());
CalcEdit1->InsertText(L"300 * 400 * 1.5",TNoParam());
CalcEdit1->InsertText(L"200 + ( 400 * 1.5 + 300 / 1.19)",TNoParam());
CalcEdit1->InsertText(L"Total",TNoParam());
OutputDebugString( PChar(CalcEdit1->FormatABC(L"lower(A) replace `total` with ``",TVariant(CalcEdit1->Text),TNoParam(),TNoParam())) );
|
74
|
How do I customize the format to display the result (right,local,2 decimals,less,font)

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

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

CalcEdit1->MultiLine = true;
CalcEdit1->FormatLocal = L"value";
CalcEdit1->FormatResult = L"<fgcolor=808080><r> = %l%";
CalcEdit1->InsertText(L"100 * 200",TNoParam());
CalcEdit1->InsertText(L"300 * 400 * 1.5",TNoParam());
CalcEdit1->InsertText(L"200 + ( 400 * 1.5 + 300 / 1.19)",TNoParam());
|
71
|
How do I customize the format to display the result (right,local,2 decimals)

CalcEdit1->MultiLine = true;
CalcEdit1->FormatLocal = L"value format `2`";
CalcEdit1->FormatResult = L"<fgcolor=808080><r> = %l%";
CalcEdit1->InsertText(L"100 * 200",TNoParam());
CalcEdit1->InsertText(L"300 * 400 * 1.5",TNoParam());
CalcEdit1->InsertText(L"200 + ( 400 * 1.5 + 300 / 1.19)",TNoParam());
|
70
|
How do I customize the format to display the result (right,local,curency)

CalcEdit1->MultiLine = true;
CalcEdit1->FormatLocal = L"currency(value)";
CalcEdit1->FormatResult = L"<fgcolor=808080><r> = %l%";
CalcEdit1->InsertText(L"100 * 200",TNoParam());
CalcEdit1->InsertText(L"300 * 400 * 1.5",TNoParam());
CalcEdit1->InsertText(L"200 + ( 400 * 1.5 + 300 / 1.19)",TNoParam());
|
69
|
How do I customize the format to display the result (right,local)

CalcEdit1->MultiLine = true;
CalcEdit1->FormatResult = L"<fgcolor=808080><r> = %l%";
CalcEdit1->InsertText(L"100 * 200",TNoParam());
CalcEdit1->InsertText(L"300 * 400 * 1.5",TNoParam());
CalcEdit1->InsertText(L"200 + ( 400 * 1.5 + 300 / 1.19)",TNoParam());
|
68
|
How do I customize the format to display the result (right)

CalcEdit1->MultiLine = true;
CalcEdit1->FormatResult = L"<fgcolor=808080><r> = %%";
CalcEdit1->InsertText(L"100 * 200",TNoParam());
CalcEdit1->InsertText(L"300 * 400 * 1.5",TNoParam());
CalcEdit1->InsertText(L"200 + ( 400 * 1.5 + 300 / 1.19)",TNoParam());
|
67
|
How do I customize the format to display the result (default)

CalcEdit1->MultiLine = true;
CalcEdit1->InsertText(L"100 * 200",TNoParam());
CalcEdit1->InsertText(L"300 * 400 * 1.5",TNoParam());
CalcEdit1->InsertText(L"200 + ( 400 * 1.5 + 300 / 1.19)",TNoParam());
|
66
|
How can I force a line to be there all the time, so user can not delete it, for instance Total

CalcEdit1->MultiLine = true;
CalcEdit1->InsertLockedText(L"Total",TNoParam());
CalcEdit1->InsertText(L"100",TNoParam());
CalcEdit1->InsertText(L"200",TNoParam());
CalcEdit1->InsertText(L"300",TNoParam());
|
65
|
Is it possible to get the value of specified variable

CalcEdit1->MultiLine = true;
CalcEdit1->InsertText(L"100",TNoParam());
CalcEdit1->InsertText(L"200",TNoParam());
CalcEdit1->InsertText(L"300",TNoParam());
CalcEdit1->InsertText(L"TVA = Total * 0.19",TNoParam());
CalcEdit1->InsertText(L"Total",TNoParam());
OutputDebugString( L"The TVA is: " );
OutputDebugString( PChar(CalcEdit1->Variable[L"TVA"]) );
|
64
|
How do I get the total

CalcEdit1->MultiLine = true;
CalcEdit1->InsertText(L"100",TNoParam());
CalcEdit1->InsertText(L"200",TNoParam());
CalcEdit1->InsertText(L"300",TNoParam());
CalcEdit1->InsertText(L"Total",TNoParam());
OutputDebugString( L"The total is: " );
OutputDebugString( PChar(CalcEdit1->Variable[L"Total"]) );
|
63
|
How do I get the easter date

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

CalcEdit1->AllowFormatInvalidOnTyping = false;
CalcEdit1->MultiLine = true;
CalcEdit1->Text = L"100 + 200(invalid)";
|
61
|
I've got a red line while I type into the control. How can I disable that (sample 1)

CalcEdit1->FormatInvalid = L"";
CalcEdit1->Text = L"100 + 200(invalid)";
|
60
|
How do I specify the color to show the locked lines

CalcEdit1->MultiLine = true;
CalcEdit1->AllowVariables = L"=";
CalcEdit1->DrawGridLines = true;
CalcEdit1->LineHeight = L"value + 8 * dpi";
CalcEdit1->GridLineColor = RGB(196,196,196);
CalcEdit1->FormatResult = L"<r>[=%l%]";
CalcEdit1->FormatLocal = L"currency(value)";
CalcEdit1->FormatTotalResult = L"<r><b> <fgcolor=FFFFFF>= %l%</b>";
CalcEdit1->BackColorLockedLine = RGB(0,0,1);
CalcEdit1->ForeColorLockedLine = RGB(255,255,255);
CalcEdit1->InsertText(L"100",TNoParam());
CalcEdit1->InsertText(L"200",TNoParam());
CalcEdit1->InsertLockedText(L"VAT = Total * 0.20",TNoParam());
CalcEdit1->InsertLockedText(L"Total",TNoParam());
|
59
|
Can I remove the colors that indicates locked lines

CalcEdit1->MultiLine = true;
CalcEdit1->AllowVariables = L"=";
CalcEdit1->DrawGridLines = true;
CalcEdit1->LineHeight = L"value + 8 * dpi";
CalcEdit1->GridLineColor = RGB(196,196,196);
CalcEdit1->FormatResult = L"<r><fgcolor=808080>[=%l%]";
CalcEdit1->FormatLocal = L"currency(value)";
CalcEdit1->FormatTotalResult = L"<r><b> = %l%</b>";
CalcEdit1->BackColorLockedLine = RGB(0,0,0);
CalcEdit1->ForeColorLockedLine = RGB(0,0,0);
CalcEdit1->InsertText(L"100",TNoParam());
CalcEdit1->InsertText(L"200",TNoParam());
CalcEdit1->InsertLockedText(L"VAT = Total * 0.20",TNoParam());
CalcEdit1->InsertLockedText(L"Total",TNoParam());
|
58
|
Can I add lines to the control, so the user can not remove/delete them ( locked lines )

CalcEdit1->MultiLine = true;
CalcEdit1->CalcType = Excalceditlib_tlb::CalcTypeEnum::exCalcIncludeAll;
CalcEdit1->AllowVariables = L"=";
CalcEdit1->DrawGridLines = true;
CalcEdit1->LineHeight = L"value + 8 * dpi";
CalcEdit1->GridLineColor = RGB(196,196,196);
CalcEdit1->FormatResult = L"<r><fgcolor=808080>[=%l%]";
CalcEdit1->FormatLocal = L"currency(value)";
CalcEdit1->FormatTotalResult = L"<r><b> = %l%</b>";
CalcEdit1->Text = L"1000";
CalcEdit1->InsertText(L"2000",TNoParam());
CalcEdit1->InsertLockedText(L"Commission = Total * 0.05 + (Total ? 2.95 : 0)",TNoParam());
CalcEdit1->InsertLockedText(L"Total",TNoParam());
|
57
|
Is it possible to highlight a specified line

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

CalcEdit1->MultiLine = true;
CalcEdit1->AllowVariables = L"=";
CalcEdit1->DrawGridLines = true;
CalcEdit1->LineHeight = L"value + 8 * dpi";
CalcEdit1->GridLineColor = RGB(196,196,196);
CalcEdit1->FormatLocal = L"currency(value)";
CalcEdit1->FormatTotalResult = L"<r><b> = %l%</b>";
CalcEdit1->BackColorTotal = RGB(240,240,240);
CalcEdit1->Text = L"100.50";
CalcEdit1->InsertText(L"200",TNoParam());
CalcEdit1->InsertText(L"300",TNoParam());
CalcEdit1->InsertText(L"400",TNoParam());
CalcEdit1->InsertText(L"VAT = Total * 0.19",TNoParam());
CalcEdit1->InsertText(L"NET = Total - VAT",TNoParam());
CalcEdit1->InsertText(L"Total",TNoParam());
|
55
|
Is it possible to display the result with no decimals

CalcEdit1->MultiLine = true;
CalcEdit1->AllowVariables = L"=";
CalcEdit1->DrawGridLines = true;
CalcEdit1->LineHeight = L"value + 8 * dpi";
CalcEdit1->GridLineColor = RGB(196,196,196);
CalcEdit1->FormatLocal = L"value format `0`";
CalcEdit1->FormatTotalResult = L"<r><b> = %l%</b>";
CalcEdit1->BackColorTotal = RGB(240,240,240);
CalcEdit1->Text = L"100.50";
CalcEdit1->InsertText(L"200",TNoParam());
CalcEdit1->InsertText(L"300",TNoParam());
CalcEdit1->InsertText(L"400",TNoParam());
CalcEdit1->InsertText(L"VAT = Total * 0.19",TNoParam());
CalcEdit1->InsertText(L"NET = Total - VAT",TNoParam());
CalcEdit1->InsertText(L"Total",TNoParam());
|
54
|
Is it possible to display the result exactly how it is defined in the control panel

CalcEdit1->MultiLine = true;
CalcEdit1->AllowVariables = L"=";
CalcEdit1->DrawGridLines = true;
CalcEdit1->LineHeight = L"value + 8 * dpi";
CalcEdit1->GridLineColor = RGB(196,196,196);
CalcEdit1->FormatLocal = L"value format ``";
CalcEdit1->FormatTotalResult = L"<r><b> = %l%</b>";
CalcEdit1->BackColorTotal = RGB(240,240,240);
CalcEdit1->Text = L"100.50";
CalcEdit1->InsertText(L"200",TNoParam());
CalcEdit1->InsertText(L"300",TNoParam());
CalcEdit1->InsertText(L"400",TNoParam());
CalcEdit1->InsertText(L"VAT = Total * 0.19",TNoParam());
CalcEdit1->InsertText(L"NET = Total - VAT",TNoParam());
CalcEdit1->InsertText(L"Total",TNoParam());
|
53
|
How can I count the lines

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

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

CalcEdit1->MultiLine = true;
CalcEdit1->AllowVariables = L"=";
CalcEdit1->ClearWildFormats();
CalcEdit1->AddWildFormat(L"<b>*=*");
CalcEdit1->Text = L"A = 400";
CalcEdit1->InsertText(L"",TNoParam());
CalcEdit1->InsertText(L"B = A + 0.22",TNoParam());
CalcEdit1->InsertText(L"A + B",TNoParam());
CalcEdit1->InsertText(L"B = B * .19",TNoParam());
CalcEdit1->InsertText(L"A + B",TNoParam());
|
49
|
I have noticed that definition of the variable is shown in italics. Can I remove that

CalcEdit1->MultiLine = true;
CalcEdit1->AllowVariables = L"=";
CalcEdit1->ClearWildFormats();
CalcEdit1->Text = L"A = 300";
CalcEdit1->InsertText(L"",TNoParam());
CalcEdit1->InsertText(L"B = A + 0.22",TNoParam());
CalcEdit1->InsertText(L"A + B",TNoParam());
CalcEdit1->InsertText(L"B = B * .19",TNoParam());
CalcEdit1->InsertText(L"A + B",TNoParam());
|
48
|
Can I define variables (sample 2)

CalcEdit1->MultiLine = true;
CalcEdit1->AllowVariables = L"is";
CalcEdit1->ClearWildFormats();
CalcEdit1->AddWildFormat(L"<b>*is*");
CalcEdit1->Text = L"A is 200";
CalcEdit1->InsertText(L"",TNoParam());
CalcEdit1->InsertText(L"B is A + 0.22",TNoParam());
CalcEdit1->InsertText(L"A + B",TNoParam());
CalcEdit1->InsertText(L"B is B * .19",TNoParam());
CalcEdit1->InsertText(L"A + B",TNoParam());
|
47
|
Can I define variables (sample 1)

CalcEdit1->MultiLine = true;
CalcEdit1->AllowVariables = L"=";
CalcEdit1->Text = L"A = 100.22";
CalcEdit1->InsertText(L"",TNoParam());
CalcEdit1->InsertText(L"B = A + 0.22",TNoParam());
CalcEdit1->InsertText(L"A + B",TNoParam());
CalcEdit1->InsertText(L"B = B * .19",TNoParam());
CalcEdit1->InsertText(L"A + B",TNoParam());
|
46
|
Comments and Prefixes

CalcEdit1->MultiLine = true;
CalcEdit1->AllowPrefixes = L"<fgcolor=808080>:</fgcolor>";
CalcEdit1->AllowComments = L"<fgcolor=008080>'</fgcolor>";
CalcEdit1->Text = L"Field A: 100 ' this is the field A";
CalcEdit1->InsertText(L"Field B: 200 ' this is the field B",TNoParam());
CalcEdit1->InsertText(L"Total",TNoParam());
|
45
|
Can I display something at the start of each line

CalcEdit1->MultiLine = true;
CalcEdit1->AllowPrefixes = L"<b>:</b>";
CalcEdit1->Text = L"Field A: 100";
CalcEdit1->InsertText(L"Field B: 200",TNoParam());
CalcEdit1->InsertText(L"Total",TNoParam());
|
44
|
I can not use TAB key. Is it possible
CalcEdit1->UseTabKey = true;
|
43
|
Does your control support comments

CalcEdit1->MultiLine = true;
CalcEdit1->CalcType = Excalceditlib_tlb::CalcTypeEnum::exCalcIncludeAll;
CalcEdit1->AllowComments = L"<fgcolor=008080>//</fgcolor>";
CalcEdit1->Text = L"104 mod 51 // modulo function";
CalcEdit1->InsertText(L"int(104/51) // int function",TNoParam());
CalcEdit1->InsertText(L"51 * int(104/51) + (104 mod 51) // check",TNoParam());
|
42
|
Can I use the modulo function ( rest )

CalcEdit1->MultiLine = true;
CalcEdit1->CalcType = Excalceditlib_tlb::CalcTypeEnum::exCalcIncludeAll;
CalcEdit1->Text = L"104 mod 51";
CalcEdit1->InsertText(L"int(104/51)",TNoParam());
CalcEdit1->InsertText(L"51 * int(104/51) + (104 mod 51)",TNoParam());
|
41
|
Can I use acos function

CalcEdit1->CalcType = Excalceditlib_tlb::CalcTypeEnum::exCalcIncludeAll;
CalcEdit1->Text = L"acos(cos(1))";
|
40
|
Can I use asin function

CalcEdit1->CalcType = Excalceditlib_tlb::CalcTypeEnum::exCalcIncludeAll;
CalcEdit1->Text = L"asin(sin(1))";
|
39
|
Can I use cos function

CalcEdit1->CalcType = Excalceditlib_tlb::CalcTypeEnum::exCalcIncludeAll;
CalcEdit1->Text = L"cos(1)";
|
38
|
Can I use sin function

CalcEdit1->CalcType = Excalceditlib_tlb::CalcTypeEnum::exCalcIncludeAll;
CalcEdit1->Text = L"sin(1)";
|
37
|
Can I use abs function (absolute part of the number)

CalcEdit1->CalcType = Excalceditlib_tlb::CalcTypeEnum::exCalcIncludeAll;
CalcEdit1->Text = L"abs(-100.99)";
|
36
|
Can I use round function

CalcEdit1->CalcType = Excalceditlib_tlb::CalcTypeEnum::exCalcIncludeAll;
CalcEdit1->Text = L"round(100.99)";
|
35
|
Can I use int function (integer part of a number)

CalcEdit1->CalcType = Excalceditlib_tlb::CalcTypeEnum::exCalcIncludeAll;
CalcEdit1->Text = L"int(100.99)";
|
34
|
Can I use sqrt function (square root of a number)

CalcEdit1->CalcType = Excalceditlib_tlb::CalcTypeEnum::exCalcIncludeAll;
CalcEdit1->Text = L"sqrt(100)";
|
33
|
How can I show invalid lines with a larger font

CalcEdit1->MultiLine = true;
CalcEdit1->LineHeight = L"value + 8 *dpi";
CalcEdit1->DrawGridLines = true;
CalcEdit1->FormatInvalid = L"<u><font ;12> </font></u>";
CalcEdit1->InsertText(L"100",TNoParam());
CalcEdit1->InsertText(L"k200",TNoParam());
CalcEdit1->InsertText(L"300",TNoParam());
|
32
|
I've noticed that while I type the text is shown in red. How can I change that

CalcEdit1->FormatInvalid = L"";
CalcEdit1->Text = L"100 * 200";
|
31
|
Can I enlarge the height of each line

CalcEdit1->MultiLine = true;
CalcEdit1->LineHeight = L"value + 8 * dpi";
CalcEdit1->DrawGridLines = true;
CalcEdit1->InsertText(L"100",TNoParam());
CalcEdit1->InsertText(L"200",TNoParam());
CalcEdit1->InsertText(L"300",TNoParam());
CalcEdit1->InsertText(L"Total",TNoParam());
|
30
|
How can I show grid lines

CalcEdit1->MultiLine = true;
CalcEdit1->DrawGridLines = true;
CalcEdit1->GridLineColor = RGB(0,0,0);
CalcEdit1->InsertText(L"100",TNoParam());
CalcEdit1->InsertText(L"200",TNoParam());
CalcEdit1->InsertText(L"300",TNoParam());
CalcEdit1->InsertText(L"Total",TNoParam());
|
29
|
How can I display the result of the total with a larger font

CalcEdit1->MultiLine = true;
CalcEdit1->DrawGridLines = true;
CalcEdit1->LineHeight = L"value + 8 * dpi";
CalcEdit1->FormatTotalResult = L"<r><b><font ;14>%l%</font></b>";
CalcEdit1->AllowTotal = L"<b><font ;14>Total</font></b>";
CalcEdit1->InsertText(L"100",TNoParam());
CalcEdit1->InsertText(L"200",TNoParam());
CalcEdit1->InsertText(L"300",TNoParam());
CalcEdit1->InsertText(L"Total",TNoParam());
|
28
|
Is it possible to show the Total / SubTotal with a different background color

CalcEdit1->MultiLine = true;
CalcEdit1->AllowTotal = L"<bgcolor=A0A0A0><b>Total</b></bgcolor>";
CalcEdit1->AllowSubTotal = L"<bgcolor=E0E0E0><b>SubTotal</b></bgcolor>";
CalcEdit1->InsertText(L"100",TNoParam());
CalcEdit1->InsertText(L"200",TNoParam());
CalcEdit1->InsertText(L"SubTotal",TNoParam());
CalcEdit1->InsertText(L"300",TNoParam());
CalcEdit1->InsertText(L"400 * 1.5",TNoParam());
CalcEdit1->InsertText(L"SubTotal",TNoParam());
CalcEdit1->InsertText(L"Total",TNoParam());
|
27
|
Is it possible to show the Total / SubTotal with a different background color

CalcEdit1->MultiLine = true;
CalcEdit1->BackColorTotal = RGB(196,196,196);
CalcEdit1->BackColorSubTotal = RGB(240,240,240);
CalcEdit1->InsertText(L"100",TNoParam());
CalcEdit1->InsertText(L"200",TNoParam());
CalcEdit1->InsertText(L"SubTotal",TNoParam());
CalcEdit1->InsertText(L"300",TNoParam());
CalcEdit1->InsertText(L"400 * 1.5",TNoParam());
CalcEdit1->InsertText(L"SubTotal",TNoParam());
CalcEdit1->InsertText(L"Total",TNoParam());
|
26
|
How can I change the color to show the numbers

CalcEdit1->FormatNumbers = L"<fgcolor=FF0000> </fgcolor>";
CalcEdit1->Text = L"1 + 2 + 3 + 4";
|
25
|
The numbers are shown in blue. How can I remove that

CalcEdit1->FormatNumbers = L"";
CalcEdit1->Text = L"1 + 2 + 3 + 4";
|
24
|
How can I export the entire text, including the result

CalcEdit1->MultiLine = true;
CalcEdit1->Text = L"100 * 1.5";
CalcEdit1->InsertText(L"120 * 1.5",TNoParam());
CalcEdit1->InsertText(L"130 * 1.5",TNoParam());
CalcEdit1->InsertText(L"Total",TNoParam());
OutputDebugString( CalcEdit1->Export );
|
23
|
Is it possible to display the result, using the current regional locale

CalcEdit1->MultiLine = true;
CalcEdit1->DrawGridLines = true;
CalcEdit1->FormatResult = L" <fgcolor=808080>[=%l%]</fgcolor>";
CalcEdit1->FormatTotalResult = L" <b>[=%l%]</b>";
CalcEdit1->InsertText(L"100 * 100",TNoParam());
CalcEdit1->InsertText(L"200 * 200",TNoParam());
CalcEdit1->InsertText(L"300 * 300",TNoParam());
CalcEdit1->InsertText(L"Total",TNoParam());
|
22
|
How can I change the format to display the total result (right)

CalcEdit1->MultiLine = true;
CalcEdit1->DrawGridLines = true;
CalcEdit1->FormatTotalResult = L"<b><fgcolor=FF0000> = %l%</fgcolor></b>";
CalcEdit1->AllowTotal = L"<b><fgcolor=00FF00>Total</fgcolor></b>";
CalcEdit1->InsertText(L"100",TNoParam());
CalcEdit1->InsertText(L"200",TNoParam());
CalcEdit1->InsertText(L"300",TNoParam());
CalcEdit1->InsertText(L"Total",TNoParam());
|
21
|
How can I change the format to display the total result (right)

CalcEdit1->MultiLine = true;
CalcEdit1->DrawGridLines = true;
CalcEdit1->LineHeight = L"value + 4 * dpi";
CalcEdit1->FormatTotalResult = L"<r><b><font ;12>%l%</font></b>";
CalcEdit1->AllowTotal = L"<b><font ;12>Total</font></b>";
CalcEdit1->InsertText(L"100",TNoParam());
CalcEdit1->InsertText(L"200",TNoParam());
CalcEdit1->InsertText(L"300",TNoParam());
CalcEdit1->InsertText(L"Total",TNoParam());
|
20
|
Is it possible to rename the SubTotal

CalcEdit1->MultiLine = true;
CalcEdit1->AllowSubTotal = L"<fgcolor=FF0000>Current Amount";
CalcEdit1->InsertText(L"100",TNoParam());
CalcEdit1->InsertText(L"200",TNoParam());
CalcEdit1->InsertText(L"Current Amount",TNoParam());
CalcEdit1->InsertText(L"300",TNoParam());
CalcEdit1->InsertText(L"400",TNoParam());
CalcEdit1->InsertText(L"Current Amount",TNoParam());
CalcEdit1->InsertText(L"Total",TNoParam());
|
19
|
How can I disable the sub-totals

CalcEdit1->MultiLine = true;
CalcEdit1->AllowSubTotal = L"";
CalcEdit1->InsertText(L"100",TNoParam());
CalcEdit1->InsertText(L"200",TNoParam());
CalcEdit1->InsertText(L"SubTotal",TNoParam());
CalcEdit1->InsertText(L"300",TNoParam());
CalcEdit1->InsertText(L"400",TNoParam());
CalcEdit1->InsertText(L"SubTotal",TNoParam());
CalcEdit1->InsertText(L"Total",TNoParam());
|
18
|
How can I add sub-totals

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

CalcEdit1->AllowTotal = L"";
CalcEdit1->MultiLine = true;
CalcEdit1->InsertText(L"100",TNoParam());
CalcEdit1->InsertText(L"200",TNoParam());
CalcEdit1->InsertText(L"300",TNoParam());
CalcEdit1->InsertText(L"Total",TNoParam());
|
16
|
Is it possible to rename the Total to Sum

CalcEdit1->AllowTotal = L"<fgcolor=FF0000><b>Sum</b></fgcolor>";
CalcEdit1->MultiLine = true;
CalcEdit1->InsertText(L"100",TNoParam());
CalcEdit1->InsertText(L"200",TNoParam());
CalcEdit1->InsertText(L"300",TNoParam());
CalcEdit1->InsertText(L"Sum",TNoParam());
|
15
|
Is it possible to add all lines

CalcEdit1->MultiLine = true;
CalcEdit1->InsertText(L"100",TNoParam());
CalcEdit1->InsertText(L"200",TNoParam());
CalcEdit1->InsertText(L"300",TNoParam());
CalcEdit1->InsertText(L"Total",TNoParam());
|
14
|
How do I insert / add a new line

CalcEdit1->MultiLine = true;
CalcEdit1->Text = L"100 * 1.5";
CalcEdit1->InsertText(L"120 * 2.5\\r\\n",TVariant(1));
CalcEdit1->InsertText(L"200 * 1.5",TNoParam());
|
13
|
How do I find out if a specified line is valid

// SelChange event - Occurs when the user selects text in the control.
void __fastcall TForm1::CalcEdit1SelChange(TObject *Sender)
{
OutputDebugString( L"CurrentLine: " );
OutputDebugString( PChar(CalcEdit1->CaretLine) );
OutputDebugString( L"CurrentLine: " );
OutputDebugString( CalcEdit1->TextLine[CalcEdit1->CaretLine] );
OutputDebugString( L"IsValid: " );
OutputDebugString( PChar(CalcEdit1->IsValid[TVariant(CalcEdit1->CaretLine)]) );
}
CalcEdit1->MultiLine = true;
CalcEdit1->Text = L"100 * 1.5";
CalcEdit1->InsertText(L"invalid",TNoParam());
CalcEdit1->InsertText(L"120 * 1.5",TNoParam());
CalcEdit1->InsertText(L"130 * 1.5",TNoParam());
|
12
|
How do I get the current line

// SelChange event - Occurs when the user selects text in the control.
void __fastcall TForm1::CalcEdit1SelChange(TObject *Sender)
{
OutputDebugString( L"CurrentLine: " );
OutputDebugString( PChar(CalcEdit1->CaretLine) );
OutputDebugString( L"CurrentLine: " );
OutputDebugString( CalcEdit1->TextLine[CalcEdit1->CaretLine] );
OutputDebugString( L"CurrentResult: " );
OutputDebugString( PChar(CalcEdit1->Result[TVariant(CalcEdit1->CaretLine)]) );
}
CalcEdit1->MultiLine = true;
CalcEdit1->Text = L"100 * 1.5";
CalcEdit1->InsertText(L"120 * 1.5",TNoParam());
CalcEdit1->InsertText(L"130 * 1.5",TNoParam());
|
11
|
How do I get the line one by one, including the result

CalcEdit1->MultiLine = true;
CalcEdit1->Text = L"100 * 1.5";
CalcEdit1->InsertText(L"120 * 1.5",TNoParam());
CalcEdit1->InsertText(L"130 * 1.5",TNoParam());
OutputDebugString( L"Lines:" );
OutputDebugString( PChar(CalcEdit1->Count) );
OutputDebugString( L"TextLine(1):" );
OutputDebugString( CalcEdit1->TextLine[1] );
OutputDebugString( L"Result(1)" );
OutputDebugString( PChar(CalcEdit1->Result[TVariant(1)]) );
OutputDebugString( L"TextLine(2):" );
OutputDebugString( CalcEdit1->TextLine[2] );
OutputDebugString( L"Result(2)" );
OutputDebugString( PChar(CalcEdit1->Result[TVariant(2)]) );
OutputDebugString( L"TextLine(3):" );
OutputDebugString( CalcEdit1->TextLine[3] );
OutputDebugString( L"Result(3)" );
OutputDebugString( PChar(CalcEdit1->Result[TVariant(3)]) );
|
10
|
Does the control supports multiple lines

CalcEdit1->MultiLine = true;
CalcEdit1->Text = L"100 * 1.5";
CalcEdit1->InsertText(L"120 * 1.5",TNoParam());
CalcEdit1->InsertText(L"130 * 1.5",TNoParam());
|
9
|
Is it possible to display the result without brakets

CalcEdit1->FormatResult = L"<fgcolor=808080> = %%</fgcolor>";
CalcEdit1->Text = L"12 + (12 / 100)/2";
|
8
|
How can I display the result on the right side of the control

CalcEdit1->FormatResult = L"<r> <fgcolor=808080>[=%%]</fgcolor>";
CalcEdit1->Text = L"12 + (12 / 100)/2";
|
7
|
Can you please advise how to change fontname and size (sample 2)

CalcEdit1->Template = L"Font.Size = 20; Font.Name = `Tahoma`; Refresh";
CalcEdit1->Text = L"1/2";
|
6
|
Can you please advise how to change fontname and size (sample 1)

CalcEdit1->Font->Size = TVariant(long(20));
CalcEdit1->Text = L"1/2";
CalcEdit1->Refresh();
|
5
|
How can I disable evaluating the selection

CalcEdit1->EvaluateSel = false;
CalcEdit1->HideSelection = false;
CalcEdit1->Text = L"(1+6.25)/4*6/3";
CalcEdit1->SelStart = 1;
CalcEdit1->SelLength = 6;
CalcEdit1->SelBackColor = RGB(0,0,0);
|
4
|
Can I define a different decimal separator

CalcEdit1->AddDecimalSep = L",";
CalcEdit1->Text = L"(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 __fastcall TForm1::CalcEdit1Change(TObject *Sender)
{
OutputDebugString( L"Valid:" );
OutputDebugString( PChar(CalcEdit1->IsValid[TNoParam()]) );
CalcEdit1->ForeColor = RGB(255,0,0);
CalcEdit1->FormatNumbers = L"<fgcolor FF0000>";
CalcEdit1->FormatResult = L"";
}
CalcEdit1->FormatInvalid = L"";
CalcEdit1->Text = L"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 __fastcall TForm1::CalcEdit1Change(TObject *Sender)
{
OutputDebugString( L"Valid:" );
OutputDebugString( PChar(CalcEdit1->IsValid[TNoParam()]) );
OutputDebugString( L"Expression: " );
OutputDebugString( CalcEdit1->Text );
OutputDebugString( L"Result: " );
OutputDebugString( PChar(CalcEdit1->Result[TNoParam()]) );
}
CalcEdit1->Text = L"(1+6.25)/4*6/3";
|
1
|
How do I programatically save / load the expression and the result

CalcEdit1->Text = L"(1+6.25)/4*6/3";
OutputDebugString( L"Expression: " );
OutputDebugString( CalcEdit1->Text );
OutputDebugString( L"Result: " );
OutputDebugString( PChar(CalcEdit1->Result[TNoParam()]) );
|