78
Is it possible to change the line's height

with CalcEdit1 do
begin
	MultiLine := True;
	Text := '(1+6.25)/4*6/3';
	InsertText('(2+6.25)/4*6/3\r\n',OleVariant(1));
	InsertText('(3+6.25)/4*6/3\r\n',OleVariant(1));
	InsertText('(4+6.25)/4*6/3\r\n',OleVariant(1));
	InsertText('Total',Null);
	LineHeight := 'value + 8 * dpi';
	DrawGridLines := True;
end
77
How do I put a picture on the control's background

with CalcEdit1 do
begin
	Picture := CalcEdit1.ExecuteTemplate('loadpicture(`c:\exontrol\images\zipdisk.gif`)');
	PictureDisplay := EXCALCEDITLib_TLB.exUpperLeft;
	MultiLine := True;
	Text := '(1+6.25)/4*6/3';
	InsertText('\r\n',OleVariant(1));
	InsertText('\r\n',OleVariant(1));
	InsertText('\r\n',OleVariant(1));
	OutputDebugString( 'Expression: ' );
	OutputDebugString( Text );
	OutputDebugString( 'Result: ' );
	OutputDebugString( Result[Null] );
end
76
How do I get the numbers only, with no Total fields (method 2)

with CalcEdit1 do
begin
	MultiLine := True;
	FormatResult := '<fgcolor=808080><r> = %%';
	InsertText('100 * 200',Null);
	InsertText('300 * 400 * 1.5',Null);
	InsertText('200 + ( 400 * 1.5 + 300 / 1.19)',Null);
	InsertText('Total',Null);
	OutputDebugString( ExecuteTemplate('FormatABC("lower(A) replace `total` with ``", Text)') );
end
75
How do I get the numbers only, with no Total fields (method 1)

with CalcEdit1 do
begin
	MultiLine := True;
	FormatResult := '<fgcolor=808080><r> = %%';
	InsertText('100 * 200',Null);
	InsertText('300 * 400 * 1.5',Null);
	InsertText('200 + ( 400 * 1.5 + 300 / 1.19)',Null);
	InsertText('Total',Null);
	OutputDebugString( FormatABC('lower(A) replace `total` with ``',OleVariant(Text),Null,Null) );
end
74
How do I customize the format to display the result (right,local,2 decimals,less,font)

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

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

with CalcEdit1 do
begin
	MultiLine := True;
	FormatLocal := 'value';
	FormatResult := '<fgcolor=808080><r> = %l%';
	InsertText('100 * 200',Null);
	InsertText('300 * 400 * 1.5',Null);
	InsertText('200 + ( 400 * 1.5 + 300 / 1.19)',Null);
end
71
How do I customize the format to display the result (right,local,2 decimals)

with CalcEdit1 do
begin
	MultiLine := True;
	FormatLocal := 'value format `2`';
	FormatResult := '<fgcolor=808080><r> = %l%';
	InsertText('100 * 200',Null);
	InsertText('300 * 400 * 1.5',Null);
	InsertText('200 + ( 400 * 1.5 + 300 / 1.19)',Null);
end
70
How do I customize the format to display the result (right,local,curency)

with CalcEdit1 do
begin
	MultiLine := True;
	FormatLocal := 'currency(value)';
	FormatResult := '<fgcolor=808080><r> = %l%';
	InsertText('100 * 200',Null);
	InsertText('300 * 400 * 1.5',Null);
	InsertText('200 + ( 400 * 1.5 + 300 / 1.19)',Null);
end
69
How do I customize the format to display the result (right,local)

with CalcEdit1 do
begin
	MultiLine := True;
	FormatResult := '<fgcolor=808080><r> = %l%';
	InsertText('100 * 200',Null);
	InsertText('300 * 400 * 1.5',Null);
	InsertText('200 + ( 400 * 1.5 + 300 / 1.19)',Null);
end
68
How do I customize the format to display the result (right)

with CalcEdit1 do
begin
	MultiLine := True;
	FormatResult := '<fgcolor=808080><r> = %%';
	InsertText('100 * 200',Null);
	InsertText('300 * 400 * 1.5',Null);
	InsertText('200 + ( 400 * 1.5 + 300 / 1.19)',Null);
end
67
How do I customize the format to display the result (default)

with CalcEdit1 do
begin
	MultiLine := True;
	InsertText('100 * 200',Null);
	InsertText('300 * 400 * 1.5',Null);
	InsertText('200 + ( 400 * 1.5 + 300 / 1.19)',Null);
end
66
How can I force a line to be there all the time, so user can not delete it, for instance Total

with CalcEdit1 do
begin
	MultiLine := True;
	InsertLockedText('Total',Null);
	InsertText('100',Null);
	InsertText('200',Null);
	InsertText('300',Null);
end
65
Is it possible to get the value of specified variable

with CalcEdit1 do
begin
	MultiLine := True;
	InsertText('100',Null);
	InsertText('200',Null);
	InsertText('300',Null);
	InsertText('TVA = Total * 0.19',Null);
	InsertText('Total',Null);
	OutputDebugString( 'The TVA is: ' );
	OutputDebugString( Variable['TVA'] );
end
64
How do I get the total

with CalcEdit1 do
begin
	MultiLine := True;
	InsertText('100',Null);
	InsertText('200',Null);
	InsertText('300',Null);
	InsertText('Total',Null);
	OutputDebugString( 'The total is: ' );
	OutputDebugString( Variable['Total'] );
end
63
How do I get the easter date

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

with CalcEdit1 do
begin
	AllowFormatInvalidOnTyping := False;
	MultiLine := True;
	Text := '100 + 200(invalid)';
end
61
I've got a red line while I type into the control. How can I disable that (sample 1)

with CalcEdit1 do
begin
	FormatInvalid := '';
	Text := '100 + 200(invalid)';
end
60
How do I specify the color to show the locked lines

with CalcEdit1 do
begin
	MultiLine := True;
	AllowVariables := '=';
	DrawGridLines := True;
	LineHeight := 'value + 8 * dpi';
	GridLineColor := RGB(196,196,196);
	FormatResult := '<r>[=%l%]';
	FormatLocal := 'currency(value)';
	FormatTotalResult := '<r><b> <fgcolor=FFFFFF>= %l%</b>';
	BackColorLockedLine := RGB(0,0,1);
	ForeColorLockedLine := RGB(255,255,255);
	InsertText('100',Null);
	InsertText('200',Null);
	InsertLockedText('VAT = Total * 0.20',Null);
	InsertLockedText('Total',Null);
end
59
Can I remove the colors that indicates locked lines

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

with CalcEdit1 do
begin
	MultiLine := True;
	CalcType := EXCALCEDITLib_TLB.exCalcIncludeAll;
	AllowVariables := '=';
	DrawGridLines := True;
	LineHeight := 'value + 8 * dpi';
	GridLineColor := RGB(196,196,196);
	FormatResult := '<r><fgcolor=808080>[=%l%]';
	FormatLocal := 'currency(value)';
	FormatTotalResult := '<r><b> = %l%</b>';
	Text := '1000';
	InsertText('2000',Null);
	InsertLockedText('Commission = Total * 0.05 + (Total ? 2.95 : 0)',Null);
	InsertLockedText('Total',Null);
end
57
Is it possible to highlight a specified line

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

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

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

with CalcEdit1 do
begin
	MultiLine := True;
	AllowVariables := '=';
	DrawGridLines := True;
	LineHeight := 'value + 8 * dpi';
	GridLineColor := RGB(196,196,196);
	FormatLocal := 'value format ``';
	FormatTotalResult := '<r><b> = %l%</b>';
	BackColorTotal := RGB(240,240,240);
	Text := '100.50';
	InsertText('200',Null);
	InsertText('300',Null);
	InsertText('400',Null);
	InsertText('VAT = Total * 0.19',Null);
	InsertText('NET = Total - VAT',Null);
	InsertText('Total',Null);
end
53
How can I count the lines

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

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

with CalcEdit1 do
begin
	MultiLine := True;
	AllowVariables := '=';
	ClearWildFormats();
	AddWildFormat('<b>*=*');
	Text := 'A = 400';
	InsertText('',Null);
	InsertText('B = A + 0.22',Null);
	InsertText('A + B',Null);
	InsertText('B = B * .19',Null);
	InsertText('A + B',Null);
end
49
I have noticed that definition of the variable is shown in italics. Can I remove that

with CalcEdit1 do
begin
	MultiLine := True;
	AllowVariables := '=';
	ClearWildFormats();
	Text := 'A = 300';
	InsertText('',Null);
	InsertText('B = A + 0.22',Null);
	InsertText('A + B',Null);
	InsertText('B = B * .19',Null);
	InsertText('A + B',Null);
end
48
Can I define variables (sample 2)

with CalcEdit1 do
begin
	MultiLine := True;
	AllowVariables := 'is';
	ClearWildFormats();
	AddWildFormat('<b>*is*');
	Text := 'A is 200';
	InsertText('',Null);
	InsertText('B is A + 0.22',Null);
	InsertText('A + B',Null);
	InsertText('B is B * .19',Null);
	InsertText('A + B',Null);
end
47
Can I define variables (sample 1)

with CalcEdit1 do
begin
	MultiLine := True;
	AllowVariables := '=';
	Text := 'A = 100.22';
	InsertText('',Null);
	InsertText('B = A + 0.22',Null);
	InsertText('A + B',Null);
	InsertText('B = B * .19',Null);
	InsertText('A + B',Null);
end
46
Comments and Prefixes

with CalcEdit1 do
begin
	MultiLine := True;
	AllowPrefixes := '<fgcolor=808080>:</fgcolor>';
	AllowComments := '<fgcolor=008080>''</fgcolor>';
	Text := 'Field A: 100 '' this is the field A';
	InsertText('Field B: 200 '' this is the field B',Null);
	InsertText('Total',Null);
end
45
Can I display something at the start of each line

with CalcEdit1 do
begin
	MultiLine := True;
	AllowPrefixes := '<b>:</b>';
	Text := 'Field A: 100';
	InsertText('Field B: 200',Null);
	InsertText('Total',Null);
end
44
I can not use TAB key. Is it possible
with CalcEdit1 do
begin
	UseTabKey := True;
end
43
Does your control support comments

with CalcEdit1 do
begin
	MultiLine := True;
	CalcType := EXCALCEDITLib_TLB.exCalcIncludeAll;
	AllowComments := '<fgcolor=008080>//</fgcolor>';
	Text := '104 mod 51 // modulo function';
	InsertText('int(104/51)  // int function',Null);
	InsertText('51 * int(104/51) + (104 mod 51)  // check',Null);
end
42
Can I use the modulo function ( rest )

with CalcEdit1 do
begin
	MultiLine := True;
	CalcType := EXCALCEDITLib_TLB.exCalcIncludeAll;
	Text := '104 mod 51';
	InsertText('int(104/51)',Null);
	InsertText('51 * int(104/51) + (104 mod 51)',Null);
end
41
Can I use acos function

with CalcEdit1 do
begin
	CalcType := EXCALCEDITLib_TLB.exCalcIncludeAll;
	Text := 'acos(cos(1))';
end
40
Can I use asin function

with CalcEdit1 do
begin
	CalcType := EXCALCEDITLib_TLB.exCalcIncludeAll;
	Text := 'asin(sin(1))';
end
39
Can I use cos function

with CalcEdit1 do
begin
	CalcType := EXCALCEDITLib_TLB.exCalcIncludeAll;
	Text := 'cos(1)';
end
38
Can I use sin function

with CalcEdit1 do
begin
	CalcType := EXCALCEDITLib_TLB.exCalcIncludeAll;
	Text := 'sin(1)';
end
37
Can I use abs function (absolute part of the number)

with CalcEdit1 do
begin
	CalcType := EXCALCEDITLib_TLB.exCalcIncludeAll;
	Text := 'abs(-100.99)';
end
36
Can I use round function

with CalcEdit1 do
begin
	CalcType := EXCALCEDITLib_TLB.exCalcIncludeAll;
	Text := 'round(100.99)';
end
35
Can I use int function (integer part of a number)

with CalcEdit1 do
begin
	CalcType := EXCALCEDITLib_TLB.exCalcIncludeAll;
	Text := 'int(100.99)';
end
34
Can I use sqrt function (square root of a number)

with CalcEdit1 do
begin
	CalcType := EXCALCEDITLib_TLB.exCalcIncludeAll;
	Text := 'sqrt(100)';
end
33
How can I show invalid lines with a larger font

with CalcEdit1 do
begin
	MultiLine := True;
	LineHeight := 'value + 8 *dpi';
	DrawGridLines := True;
	FormatInvalid := '<u><font ;12> </font></u>';
	InsertText('100',Null);
	InsertText('k200',Null);
	InsertText('300',Null);
end
32
I've noticed that while I type the text is shown in red. How can I change that

with CalcEdit1 do
begin
	FormatInvalid := '';
	Text := '100 * 200';
end
31
Can I enlarge the height of each line

with CalcEdit1 do
begin
	MultiLine := True;
	LineHeight := 'value + 8 * dpi';
	DrawGridLines := True;
	InsertText('100',Null);
	InsertText('200',Null);
	InsertText('300',Null);
	InsertText('Total',Null);
end
30
How can I show grid lines

with CalcEdit1 do
begin
	MultiLine := True;
	DrawGridLines := True;
	GridLineColor := RGB(0,0,0);
	InsertText('100',Null);
	InsertText('200',Null);
	InsertText('300',Null);
	InsertText('Total',Null);
end
29
How can I display the result of the total with a larger font

with CalcEdit1 do
begin
	MultiLine := True;
	DrawGridLines := True;
	LineHeight := 'value  + 8 * dpi';
	FormatTotalResult := '<r><b><font ;14>%l%</font></b>';
	AllowTotal := '<b><font ;14>Total</font></b>';
	InsertText('100',Null);
	InsertText('200',Null);
	InsertText('300',Null);
	InsertText('Total',Null);
end
28
Is it possible to show the Total / SubTotal with a different background color

with CalcEdit1 do
begin
	MultiLine := True;
	AllowTotal := '<bgcolor=A0A0A0><b>Total</b></bgcolor>';
	AllowSubTotal := '<bgcolor=E0E0E0><b>SubTotal</b></bgcolor>';
	InsertText('100',Null);
	InsertText('200',Null);
	InsertText('SubTotal',Null);
	InsertText('300',Null);
	InsertText('400 * 1.5',Null);
	InsertText('SubTotal',Null);
	InsertText('Total',Null);
end
27
Is it possible to show the Total / SubTotal with a different background color

with CalcEdit1 do
begin
	MultiLine := True;
	BackColorTotal := RGB(196,196,196);
	BackColorSubTotal := RGB(240,240,240);
	InsertText('100',Null);
	InsertText('200',Null);
	InsertText('SubTotal',Null);
	InsertText('300',Null);
	InsertText('400 * 1.5',Null);
	InsertText('SubTotal',Null);
	InsertText('Total',Null);
end
26
How can I change the color to show the numbers

with CalcEdit1 do
begin
	FormatNumbers := '<fgcolor=FF0000> </fgcolor>';
	Text := '1 + 2 + 3 + 4';
end
25
The numbers are shown in blue. How can I remove that

with CalcEdit1 do
begin
	FormatNumbers := '';
	Text := '1 + 2 + 3 + 4';
end
24
How can I export the entire text, including the result

with CalcEdit1 do
begin
	MultiLine := True;
	Text := '100 * 1.5';
	InsertText('120 * 1.5',Null);
	InsertText('130 * 1.5',Null);
	InsertText('Total',Null);
	OutputDebugString( Export );
end
23
Is it possible to display the result, using the current regional locale

with CalcEdit1 do
begin
	MultiLine := True;
	DrawGridLines := True;
	FormatResult := ' <fgcolor=808080>[=%l%]</fgcolor>';
	FormatTotalResult := ' <b>[=%l%]</b>';
	InsertText('100 * 100',Null);
	InsertText('200 * 200',Null);
	InsertText('300 * 300',Null);
	InsertText('Total',Null);
end
22
How can I change the format to display the total result (right)

with CalcEdit1 do
begin
	MultiLine := True;
	DrawGridLines := True;
	FormatTotalResult := '<b><fgcolor=FF0000> = %l%</fgcolor></b>';
	AllowTotal := '<b><fgcolor=00FF00>Total</fgcolor></b>';
	InsertText('100',Null);
	InsertText('200',Null);
	InsertText('300',Null);
	InsertText('Total',Null);
end
21
How can I change the format to display the total result (right)

with CalcEdit1 do
begin
	MultiLine := True;
	DrawGridLines := True;
	LineHeight := 'value  + 4 * dpi';
	FormatTotalResult := '<r><b><font ;12>%l%</font></b>';
	AllowTotal := '<b><font ;12>Total</font></b>';
	InsertText('100',Null);
	InsertText('200',Null);
	InsertText('300',Null);
	InsertText('Total',Null);
end
20
Is it possible to rename the SubTotal

with CalcEdit1 do
begin
	MultiLine := True;
	AllowSubTotal := '<fgcolor=FF0000>Current Amount';
	InsertText('100',Null);
	InsertText('200',Null);
	InsertText('Current Amount',Null);
	InsertText('300',Null);
	InsertText('400',Null);
	InsertText('Current Amount',Null);
	InsertText('Total',Null);
end
19
How can I disable the sub-totals

with CalcEdit1 do
begin
	MultiLine := True;
	AllowSubTotal := '';
	InsertText('100',Null);
	InsertText('200',Null);
	InsertText('SubTotal',Null);
	InsertText('300',Null);
	InsertText('400',Null);
	InsertText('SubTotal',Null);
	InsertText('Total',Null);
end
18
How can I add sub-totals

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

with CalcEdit1 do
begin
	AllowTotal := '';
	MultiLine := True;
	InsertText('100',Null);
	InsertText('200',Null);
	InsertText('300',Null);
	InsertText('Total',Null);
end
16
Is it possible to rename the Total to Sum

with CalcEdit1 do
begin
	AllowTotal := '<fgcolor=FF0000><b>Sum</b></fgcolor>';
	MultiLine := True;
	InsertText('100',Null);
	InsertText('200',Null);
	InsertText('300',Null);
	InsertText('Sum',Null);
end
15
Is it possible to add all lines

with CalcEdit1 do
begin
	MultiLine := True;
	InsertText('100',Null);
	InsertText('200',Null);
	InsertText('300',Null);
	InsertText('Total',Null);
end
14
How do I insert / add a new line

with CalcEdit1 do
begin
	MultiLine := True;
	Text := '100 * 1.5';
	InsertText('120 * 2.5\r\n',OleVariant(1));
	InsertText('200 * 1.5',Null);
end
13
How do I find out if a specified line is valid

// SelChange event - Occurs when the user selects text in the control.
procedure TForm1.CalcEdit1SelChange(ASender: TObject; );
begin
	with CalcEdit1 do
	begin
		OutputDebugString( 'CurrentLine: ' );
		OutputDebugString( CaretLine );
		OutputDebugString( 'CurrentLine: ' );
		OutputDebugString( TextLine[CaretLine] );
		OutputDebugString( 'IsValid: ' );
		OutputDebugString( IsValid[OleVariant(CaretLine)] );
	end
end;

with CalcEdit1 do
begin
	MultiLine := True;
	Text := '100 * 1.5';
	InsertText('invalid',Null);
	InsertText('120 * 1.5',Null);
	InsertText('130 * 1.5',Null);
end
12
How do I get the current line

// SelChange event - Occurs when the user selects text in the control.
procedure TForm1.CalcEdit1SelChange(ASender: TObject; );
begin
	with CalcEdit1 do
	begin
		OutputDebugString( 'CurrentLine: ' );
		OutputDebugString( CaretLine );
		OutputDebugString( 'CurrentLine: ' );
		OutputDebugString( TextLine[CaretLine] );
		OutputDebugString( 'CurrentResult: ' );
		OutputDebugString( Result[OleVariant(CaretLine)] );
	end
end;

with CalcEdit1 do
begin
	MultiLine := True;
	Text := '100 * 1.5';
	InsertText('120 * 1.5',Null);
	InsertText('130 * 1.5',Null);
end
11
How do I get the line one by one, including the result

with CalcEdit1 do
begin
	MultiLine := True;
	Text := '100 * 1.5';
	InsertText('120 * 1.5',Null);
	InsertText('130 * 1.5',Null);
	OutputDebugString( 'Lines:' );
	OutputDebugString( Count );
	OutputDebugString( 'TextLine(1):' );
	OutputDebugString( TextLine[1] );
	OutputDebugString( 'Result(1)' );
	OutputDebugString( Result[OleVariant(1)] );
	OutputDebugString( 'TextLine(2):' );
	OutputDebugString( TextLine[2] );
	OutputDebugString( 'Result(2)' );
	OutputDebugString( Result[OleVariant(2)] );
	OutputDebugString( 'TextLine(3):' );
	OutputDebugString( TextLine[3] );
	OutputDebugString( 'Result(3)' );
	OutputDebugString( Result[OleVariant(3)] );
end
10
Does the control supports multiple lines

with CalcEdit1 do
begin
	MultiLine := True;
	Text := '100 * 1.5';
	InsertText('120 * 1.5',Null);
	InsertText('130 * 1.5',Null);
end
9
Is it possible to display the result without brakets

with CalcEdit1 do
begin
	FormatResult := '<fgcolor=808080> = %%</fgcolor>';
	Text := '12 + (12 / 100)/2';
end
8
How can I display the result on the right side of the control

with CalcEdit1 do
begin
	FormatResult := '<r> <fgcolor=808080>[=%%]</fgcolor>';
	Text := '12 + (12 / 100)/2';
end
7
Can you please advise how to change fontname and size (sample 2)

with CalcEdit1 do
begin
	Template := 'Font.Size = 20; Font.Name = `Tahoma`; Refresh';
	Text := '1/2';
end
6
Can you please advise how to change fontname and size (sample 1)

with CalcEdit1 do
begin
	Font.Size := 20;
	Text := '1/2';
	Refresh();
end
5
How can I disable evaluating the selection

with CalcEdit1 do
begin
	EvaluateSel := False;
	HideSelection := False;
	Text := '(1+6.25)/4*6/3';
	SelStart := 1;
	SelLength := 6;
	SelBackColor := RGB(0,0,0);
end
4
Can I define a different decimal separator

with CalcEdit1 do
begin
	AddDecimalSep := ',';
	Text := '(1+6,25)/4*6/3';
end
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.
procedure TForm1.CalcEdit1Change(ASender: TObject; );
begin
	with CalcEdit1 do
	begin
		OutputDebugString( 'Valid:' );
		OutputDebugString( IsValid[Null] );
		ForeColor := RGB(255,0,0);
		FormatNumbers := '<fgcolor FF0000>';
		FormatResult := '';
	end
end;

with CalcEdit1 do
begin
	FormatInvalid := '';
	Text := 'invalid(1+6.25)/4*6/3';
end
2
Is there any function to know if the expression is valid

// Change event - Indicates that the control's text has changed.
procedure TForm1.CalcEdit1Change(ASender: TObject; );
begin
	with CalcEdit1 do
	begin
		OutputDebugString( 'Valid:' );
		OutputDebugString( IsValid[Null] );
		OutputDebugString( 'Expression: ' );
		OutputDebugString( Text );
		OutputDebugString( 'Result: ' );
		OutputDebugString( Result[Null] );
	end
end;

with CalcEdit1 do
begin
	Text := '(1+6.25)/4*6/3';
end
1
How do I programatically save / load the expression and the result

with CalcEdit1 do
begin
	Text := '(1+6.25)/4*6/3';
	OutputDebugString( 'Expression: ' );
	OutputDebugString( Text );
	OutputDebugString( 'Result: ' );
	OutputDebugString( Result[Null] );
end