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

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "Text", "(1+6.25)/4*6/3");
_ObjectCallMethod( calcedit , "InsertText", "(2+6.25)/4*6/3\r\n",1);
_ObjectCallMethod( calcedit , "InsertText", "(3+6.25)/4*6/3\r\n",1);
_ObjectCallMethod( calcedit , "InsertText", "(4+6.25)/4*6/3\r\n",1);
_ObjectCallMethod( calcedit , "InsertText", "Total");
_ObjectSetProperty( calcedit , "LineHeight", "value + 8 * dpi");
_ObjectSetProperty( calcedit , "DrawGridLines", -1);
|
77
|
How do I put a picture on the control's background

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "Picture", _ObjectCallMethod( calcedit , "ExecuteTemplate", "loadpicture(`c:\exontrol\images\zipdisk.gif`)"));
_ObjectSetProperty( calcedit , "PictureDisplay", 0);
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "Text", "(1+6.25)/4*6/3");
_ObjectCallMethod( calcedit , "InsertText", "\r\n",1);
_ObjectCallMethod( calcedit , "InsertText", "\r\n",1);
_ObjectCallMethod( calcedit , "InsertText", "\r\n",1);
Message( "Expression: " );
Message( _ObjectGetProperty( calcedit , "Text") );
Message( "Result: " );
Message( _ObjectCallMethod(calcedit, "ExecuteTemplate", "Result()") );
|
76
|
How do I get the numbers only, with no Total fields (method 2)

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "FormatResult", "<fgcolor=808080><r> = %%");
_ObjectCallMethod( calcedit , "InsertText", "100 * 200");
_ObjectCallMethod( calcedit , "InsertText", "300 * 400 * 1.5");
_ObjectCallMethod( calcedit , "InsertText", "200 + ( 400 * 1.5 + 300 / 1.19)");
_ObjectCallMethod( calcedit , "InsertText", "Total");
Message( _ObjectCallMethod( calcedit , "ExecuteTemplate", "FormatABC(^"lower(A) replace `total` with ``^", Text)") );
|
75
|
How do I get the numbers only, with no Total fields (method 1)

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "FormatResult", "<fgcolor=808080><r> = %%");
_ObjectCallMethod( calcedit , "InsertText", "100 * 200");
_ObjectCallMethod( calcedit , "InsertText", "300 * 400 * 1.5");
_ObjectCallMethod( calcedit , "InsertText", "200 + ( 400 * 1.5 + 300 / 1.19)");
_ObjectCallMethod( calcedit , "InsertText", "Total");
Message( _ObjectCallMethod( calcedit , "FormatABC", "lower(A) replace `total` with ``",_ObjectGetProperty( calcedit , "Text")) );
|
74
|
How do I customize the format to display the result (right,local,2 decimals,less,font)

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "LineHeight", "value + 8 * dpi");
_ObjectSetProperty( calcedit , "FormatLocal", "( value < 10000 ? `<fgcolor=000000><b><font ;16>` : ``) + (value format `2`)");
_ObjectSetProperty( calcedit , "FormatResult", "<fgcolor=808080><r> = %l%");
_ObjectCallMethod( calcedit , "InsertText", "100 * 200");
_ObjectCallMethod( calcedit , "InsertText", "300 * 400 * 1.5");
_ObjectCallMethod( calcedit , "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)

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

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "FormatLocal", "value");
_ObjectSetProperty( calcedit , "FormatResult", "<fgcolor=808080><r> = %l%");
_ObjectCallMethod( calcedit , "InsertText", "100 * 200");
_ObjectCallMethod( calcedit , "InsertText", "300 * 400 * 1.5");
_ObjectCallMethod( calcedit , "InsertText", "200 + ( 400 * 1.5 + 300 / 1.19)");
|
71
|
How do I customize the format to display the result (right,local,2 decimals)

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

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "FormatLocal", "currency(value)");
_ObjectSetProperty( calcedit , "FormatResult", "<fgcolor=808080><r> = %l%");
_ObjectCallMethod( calcedit , "InsertText", "100 * 200");
_ObjectCallMethod( calcedit , "InsertText", "300 * 400 * 1.5");
_ObjectCallMethod( calcedit , "InsertText", "200 + ( 400 * 1.5 + 300 / 1.19)");
|
69
|
How do I customize the format to display the result (right,local)

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "FormatResult", "<fgcolor=808080><r> = %l%");
_ObjectCallMethod( calcedit , "InsertText", "100 * 200");
_ObjectCallMethod( calcedit , "InsertText", "300 * 400 * 1.5");
_ObjectCallMethod( calcedit , "InsertText", "200 + ( 400 * 1.5 + 300 / 1.19)");
|
68
|
How do I customize the format to display the result (right)

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "FormatResult", "<fgcolor=808080><r> = %%");
_ObjectCallMethod( calcedit , "InsertText", "100 * 200");
_ObjectCallMethod( calcedit , "InsertText", "300 * 400 * 1.5");
_ObjectCallMethod( calcedit , "InsertText", "200 + ( 400 * 1.5 + 300 / 1.19)");
|
67
|
How do I customize the format to display the result (default)

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectCallMethod( calcedit , "InsertText", "100 * 200");
_ObjectCallMethod( calcedit , "InsertText", "300 * 400 * 1.5");
_ObjectCallMethod( calcedit , "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

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectCallMethod( calcedit , "InsertLockedText", "Total");
_ObjectCallMethod( calcedit , "InsertText", "100");
_ObjectCallMethod( calcedit , "InsertText", "200");
_ObjectCallMethod( calcedit , "InsertText", "300");
|
65
|
Is it possible to get the value of specified variable

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectCallMethod( calcedit , "InsertText", "100");
_ObjectCallMethod( calcedit , "InsertText", "200");
_ObjectCallMethod( calcedit , "InsertText", "300");
_ObjectCallMethod( calcedit , "InsertText", "TVA = Total * 0.19");
_ObjectCallMethod( calcedit , "InsertText", "Total");
Message( "The TVA is: " );
Message( _ObjectCallMethod(calcedit, "ExecuteTemplate", "Variable(`TVA`)") );
|
64
|
How do I get the total

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectCallMethod( calcedit , "InsertText", "100");
_ObjectCallMethod( calcedit , "InsertText", "200");
_ObjectCallMethod( calcedit , "InsertText", "300");
_ObjectCallMethod( calcedit , "InsertText", "Total");
Message( "The total is: " );
Message( _ObjectCallMethod(calcedit, "ExecuteTemplate", "Variable(`Total`)") );
|
63
|
How do I get the easter date

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

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "AllowFormatInvalidOnTyping", 0);
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "Text", "100 + 200(invalid)");
|
61
|
I've got a red line while I type into the control. How can I disable that (sample 1)

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "FormatInvalid", "");
_ObjectSetProperty( calcedit , "Text", "100 + 200(invalid)");
|
60
|
How do I specify the color to show the locked lines

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "AllowVariables", "=");
_ObjectSetProperty( calcedit , "DrawGridLines", -1);
_ObjectSetProperty( calcedit , "LineHeight", "value + 8 * dpi");
_ObjectSetProperty( calcedit , "GridLineColor", 12895428);
_ObjectSetProperty( calcedit , "FormatResult", "<r>[=%l%]");
_ObjectSetProperty( calcedit , "FormatLocal", "currency(value)");
_ObjectSetProperty( calcedit , "FormatTotalResult", "<r><b> <fgcolor=FFFFFF>= %l%</b>");
_ObjectSetProperty( calcedit , "BackColorLockedLine", 65536);
_ObjectSetProperty( calcedit , "ForeColorLockedLine", 16777215);
_ObjectCallMethod( calcedit , "InsertText", "100");
_ObjectCallMethod( calcedit , "InsertText", "200");
_ObjectCallMethod( calcedit , "InsertLockedText", "VAT = Total * 0.20");
_ObjectCallMethod( calcedit , "InsertLockedText", "Total");
|
59
|
Can I remove the colors that indicates locked lines

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

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "CalcType", -1);
_ObjectSetProperty( calcedit , "AllowVariables", "=");
_ObjectSetProperty( calcedit , "DrawGridLines", -1);
_ObjectSetProperty( calcedit , "LineHeight", "value + 8 * dpi");
_ObjectSetProperty( calcedit , "GridLineColor", 12895428);
_ObjectSetProperty( calcedit , "FormatResult", "<r><fgcolor=808080>[=%l%]");
_ObjectSetProperty( calcedit , "FormatLocal", "currency(value)");
_ObjectSetProperty( calcedit , "FormatTotalResult", "<r><b> = %l%</b>");
_ObjectSetProperty( calcedit , "Text", "1000");
_ObjectCallMethod( calcedit , "InsertText", "2000");
_ObjectCallMethod( calcedit , "InsertLockedText", "Commission = Total * 0.05 + (Total ? 2.95 : 0)");
_ObjectCallMethod( calcedit , "InsertLockedText", "Total");
|
57
|
Is it possible to highlight a specified line

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

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "AllowVariables", "=");
_ObjectSetProperty( calcedit , "DrawGridLines", -1);
_ObjectSetProperty( calcedit , "LineHeight", "value + 8 * dpi");
_ObjectSetProperty( calcedit , "GridLineColor", 12895428);
_ObjectSetProperty( calcedit , "FormatLocal", "currency(value)");
_ObjectSetProperty( calcedit , "FormatTotalResult", "<r><b> = %l%</b>");
_ObjectSetProperty( calcedit , "BackColorTotal", 15790320);
_ObjectSetProperty( calcedit , "Text", "100.50");
_ObjectCallMethod( calcedit , "InsertText", "200");
_ObjectCallMethod( calcedit , "InsertText", "300");
_ObjectCallMethod( calcedit , "InsertText", "400");
_ObjectCallMethod( calcedit , "InsertText", "VAT = Total * 0.19");
_ObjectCallMethod( calcedit , "InsertText", "NET = Total - VAT");
_ObjectCallMethod( calcedit , "InsertText", "Total");
|
55
|
Is it possible to display the result with no decimals

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "AllowVariables", "=");
_ObjectSetProperty( calcedit , "DrawGridLines", -1);
_ObjectSetProperty( calcedit , "LineHeight", "value + 8 * dpi");
_ObjectSetProperty( calcedit , "GridLineColor", 12895428);
_ObjectSetProperty( calcedit , "FormatLocal", "value format `0`");
_ObjectSetProperty( calcedit , "FormatTotalResult", "<r><b> = %l%</b>");
_ObjectSetProperty( calcedit , "BackColorTotal", 15790320);
_ObjectSetProperty( calcedit , "Text", "100.50");
_ObjectCallMethod( calcedit , "InsertText", "200");
_ObjectCallMethod( calcedit , "InsertText", "300");
_ObjectCallMethod( calcedit , "InsertText", "400");
_ObjectCallMethod( calcedit , "InsertText", "VAT = Total * 0.19");
_ObjectCallMethod( calcedit , "InsertText", "NET = Total - VAT");
_ObjectCallMethod( calcedit , "InsertText", "Total");
|
54
|
Is it possible to display the result exactly how it is defined in the control panel

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "AllowVariables", "=");
_ObjectSetProperty( calcedit , "DrawGridLines", -1);
_ObjectSetProperty( calcedit , "LineHeight", "value + 8 * dpi");
_ObjectSetProperty( calcedit , "GridLineColor", 12895428);
_ObjectSetProperty( calcedit , "FormatLocal", "value format ``");
_ObjectSetProperty( calcedit , "FormatTotalResult", "<r><b> = %l%</b>");
_ObjectSetProperty( calcedit , "BackColorTotal", 15790320);
_ObjectSetProperty( calcedit , "Text", "100.50");
_ObjectCallMethod( calcedit , "InsertText", "200");
_ObjectCallMethod( calcedit , "InsertText", "300");
_ObjectCallMethod( calcedit , "InsertText", "400");
_ObjectCallMethod( calcedit , "InsertText", "VAT = Total * 0.19");
_ObjectCallMethod( calcedit , "InsertText", "NET = Total - VAT");
_ObjectCallMethod( calcedit , "InsertText", "Total");
|
53
|
How can I count the lines

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "AllowCount", "count");
_ObjectSetProperty( calcedit , "AllowSubCount", "subcount");
_ObjectSetProperty( calcedit , "DrawGridLines", -1);
_ObjectSetProperty( calcedit , "LineHeight", "value + 8 * dpi");
_ObjectSetProperty( calcedit , "GridLineColor", 12895428);
_ObjectCallMethod( calcedit , "InsertText", "100");
_ObjectCallMethod( calcedit , "InsertText", "200");
_ObjectCallMethod( calcedit , "InsertText", "SubCount");
_ObjectCallMethod( calcedit , "InsertText", "300");
_ObjectCallMethod( calcedit , "InsertText", "400");
_ObjectCallMethod( calcedit , "InsertText", "500");
_ObjectCallMethod( calcedit , "InsertText", "SubCount");
_ObjectCallMethod( calcedit , "InsertText", "Count");
|
52
|
How can I compute the average
OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "AllowVariables", "=");
_ObjectSetProperty( calcedit , "DrawGridLines", -1);
_ObjectSetProperty( calcedit , "LineHeight", "value + 8 * dpi");
_ObjectSetProperty( calcedit , "GridLineColor", 12895428);
_ObjectSetProperty( calcedit , "FormatTotalResult", "<r><b> = %l%</b>");
_ObjectSetProperty( calcedit , "BackColorTotal", 15790320);
_ObjectSetProperty( calcedit , "Text", "Average = Total / Count");
_ObjectCallMethod( calcedit , "InsertText", "100");
_ObjectCallMethod( calcedit , "InsertText", "200");
_ObjectCallMethod( calcedit , "InsertText", "300");
_ObjectCallMethod( calcedit , "InsertText", "400");
_ObjectCallMethod( calcedit , "InsertText", "VAT = Total * 0.19");
_ObjectCallMethod( calcedit , "InsertText", "NET = Total - VAT");
_ObjectCallMethod( calcedit , "InsertText", "Total");
|
51
|
Variables or Computed Fields

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "AllowVariables", "=");
_ObjectSetProperty( calcedit , "DrawGridLines", -1);
_ObjectSetProperty( calcedit , "LineHeight", "value + 8 * dpi");
_ObjectSetProperty( calcedit , "GridLineColor", 12895428);
_ObjectSetProperty( calcedit , "FormatTotalResult", "<r><b> = %l%</b>");
_ObjectSetProperty( calcedit , "BackColorTotal", 15790320);
_ObjectSetProperty( calcedit , "Text", "100");
_ObjectCallMethod( calcedit , "InsertText", "200");
_ObjectCallMethod( calcedit , "InsertText", "300");
_ObjectCallMethod( calcedit , "InsertText", "400");
_ObjectCallMethod( calcedit , "InsertText", "VAT = Total * 0.19");
_ObjectCallMethod( calcedit , "InsertText", "NET = Total - VAT");
_ObjectCallMethod( calcedit , "InsertText", "Total");
|
50
|
I have noticed that definition of the variable is shown in italics. Can I change that

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "AllowVariables", "=");
_ObjectCallMethod( calcedit , "ClearWildFormats");
_ObjectCallMethod( calcedit , "AddWildFormat", "<b>*=*");
_ObjectSetProperty( calcedit , "Text", "A = 400");
_ObjectCallMethod( calcedit , "InsertText", "");
_ObjectCallMethod( calcedit , "InsertText", "B = A + 0.22");
_ObjectCallMethod( calcedit , "InsertText", "A + B");
_ObjectCallMethod( calcedit , "InsertText", "B = B * .19");
_ObjectCallMethod( calcedit , "InsertText", "A + B");
|
49
|
I have noticed that definition of the variable is shown in italics. Can I remove that

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "AllowVariables", "=");
_ObjectCallMethod( calcedit , "ClearWildFormats");
_ObjectSetProperty( calcedit , "Text", "A = 300");
_ObjectCallMethod( calcedit , "InsertText", "");
_ObjectCallMethod( calcedit , "InsertText", "B = A + 0.22");
_ObjectCallMethod( calcedit , "InsertText", "A + B");
_ObjectCallMethod( calcedit , "InsertText", "B = B * .19");
_ObjectCallMethod( calcedit , "InsertText", "A + B");
|
48
|
Can I define variables (sample 2)

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "AllowVariables", "is");
_ObjectCallMethod( calcedit , "ClearWildFormats");
_ObjectCallMethod( calcedit , "AddWildFormat", "<b>*is*");
_ObjectSetProperty( calcedit , "Text", "A is 200");
_ObjectCallMethod( calcedit , "InsertText", "");
_ObjectCallMethod( calcedit , "InsertText", "B is A + 0.22");
_ObjectCallMethod( calcedit , "InsertText", "A + B");
_ObjectCallMethod( calcedit , "InsertText", "B is B * .19");
_ObjectCallMethod( calcedit , "InsertText", "A + B");
|
47
|
Can I define variables (sample 1)

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "AllowVariables", "=");
_ObjectSetProperty( calcedit , "Text", "A = 100.22");
_ObjectCallMethod( calcedit , "InsertText", "");
_ObjectCallMethod( calcedit , "InsertText", "B = A + 0.22");
_ObjectCallMethod( calcedit , "InsertText", "A + B");
_ObjectCallMethod( calcedit , "InsertText", "B = B * .19");
_ObjectCallMethod( calcedit , "InsertText", "A + B");
|
46
|
Comments and Prefixes

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "AllowPrefixes", "<fgcolor=808080>:</fgcolor>");
_ObjectSetProperty( calcedit , "AllowComments", "<fgcolor=008080>'</fgcolor>");
_ObjectSetProperty( calcedit , "Text", "Field A: 100 ' this is the field A");
_ObjectCallMethod( calcedit , "InsertText", "Field B: 200 ' this is the field B");
_ObjectCallMethod( calcedit , "InsertText", "Total");
|
45
|
Can I display something at the start of each line

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "AllowPrefixes", "<b>:</b>");
_ObjectSetProperty( calcedit , "Text", "Field A: 100");
_ObjectCallMethod( calcedit , "InsertText", "Field B: 200");
_ObjectCallMethod( calcedit , "InsertText", "Total");
|
44
|
I can not use TAB key. Is it possible
OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "UseTabKey", -1);
|
43
|
Does your control support comments

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "CalcType", -1);
_ObjectSetProperty( calcedit , "AllowComments", "<fgcolor=008080>//</fgcolor>");
_ObjectSetProperty( calcedit , "Text", "104 mod 51 // modulo function");
_ObjectCallMethod( calcedit , "InsertText", "int(104/51) // int function");
_ObjectCallMethod( calcedit , "InsertText", "51 * int(104/51) + (104 mod 51) // check");
|
42
|
Can I use the modulo function ( rest )

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "CalcType", -1);
_ObjectSetProperty( calcedit , "Text", "104 mod 51");
_ObjectCallMethod( calcedit , "InsertText", "int(104/51)");
_ObjectCallMethod( calcedit , "InsertText", "51 * int(104/51) + (104 mod 51)");
|
41
|
Can I use acos function

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "CalcType", -1);
_ObjectSetProperty( calcedit , "Text", "acos(cos(1))");
|
40
|
Can I use asin function

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "CalcType", -1);
_ObjectSetProperty( calcedit , "Text", "asin(sin(1))");
|
39
|
Can I use cos function

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "CalcType", -1);
_ObjectSetProperty( calcedit , "Text", "cos(1)");
|
38
|
Can I use sin function

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "CalcType", -1);
_ObjectSetProperty( calcedit , "Text", "sin(1)");
|
37
|
Can I use abs function (absolute part of the number)

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "CalcType", -1);
_ObjectSetProperty( calcedit , "Text", "abs(-100.99)");
|
36
|
Can I use round function

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "CalcType", -1);
_ObjectSetProperty( calcedit , "Text", "round(100.99)");
|
35
|
Can I use int function (integer part of a number)

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "CalcType", -1);
_ObjectSetProperty( calcedit , "Text", "int(100.99)");
|
34
|
Can I use sqrt function (square root of a number)

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "CalcType", -1);
_ObjectSetProperty( calcedit , "Text", "sqrt(100)");
|
33
|
How can I show invalid lines with a larger font

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

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "FormatInvalid", "");
_ObjectSetProperty( calcedit , "Text", "100 * 200");
|
31
|
Can I enlarge the height of each line

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "LineHeight", "value + 8 * dpi");
_ObjectSetProperty( calcedit , "DrawGridLines", -1);
_ObjectCallMethod( calcedit , "InsertText", "100");
_ObjectCallMethod( calcedit , "InsertText", "200");
_ObjectCallMethod( calcedit , "InsertText", "300");
_ObjectCallMethod( calcedit , "InsertText", "Total");
|
30
|
How can I show grid lines

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "DrawGridLines", -1);
_ObjectSetProperty( calcedit , "GridLineColor", 0);
_ObjectCallMethod( calcedit , "InsertText", "100");
_ObjectCallMethod( calcedit , "InsertText", "200");
_ObjectCallMethod( calcedit , "InsertText", "300");
_ObjectCallMethod( calcedit , "InsertText", "Total");
|
29
|
How can I display the result of the total with a larger font

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

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "AllowTotal", "<bgcolor=A0A0A0><b>Total</b></bgcolor>");
_ObjectSetProperty( calcedit , "AllowSubTotal", "<bgcolor=E0E0E0><b>SubTotal</b></bgcolor>");
_ObjectCallMethod( calcedit , "InsertText", "100");
_ObjectCallMethod( calcedit , "InsertText", "200");
_ObjectCallMethod( calcedit , "InsertText", "SubTotal");
_ObjectCallMethod( calcedit , "InsertText", "300");
_ObjectCallMethod( calcedit , "InsertText", "400 * 1.5");
_ObjectCallMethod( calcedit , "InsertText", "SubTotal");
_ObjectCallMethod( calcedit , "InsertText", "Total");
|
27
|
Is it possible to show the Total / SubTotal with a different background color

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "BackColorTotal", 12895428);
_ObjectSetProperty( calcedit , "BackColorSubTotal", 15790320);
_ObjectCallMethod( calcedit , "InsertText", "100");
_ObjectCallMethod( calcedit , "InsertText", "200");
_ObjectCallMethod( calcedit , "InsertText", "SubTotal");
_ObjectCallMethod( calcedit , "InsertText", "300");
_ObjectCallMethod( calcedit , "InsertText", "400 * 1.5");
_ObjectCallMethod( calcedit , "InsertText", "SubTotal");
_ObjectCallMethod( calcedit , "InsertText", "Total");
|
26
|
How can I change the color to show the numbers

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "FormatNumbers", "<fgcolor=FF0000> </fgcolor>");
_ObjectSetProperty( calcedit , "Text", "1 + 2 + 3 + 4");
|
25
|
The numbers are shown in blue. How can I remove that

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "FormatNumbers", "");
_ObjectSetProperty( calcedit , "Text", "1 + 2 + 3 + 4");
|
24
|
How can I export the entire text, including the result

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "Text", "100 * 1.5");
_ObjectCallMethod( calcedit , "InsertText", "120 * 1.5");
_ObjectCallMethod( calcedit , "InsertText", "130 * 1.5");
_ObjectCallMethod( calcedit , "InsertText", "Total");
Message( _ObjectGetProperty( calcedit , "Export") );
|
23
|
Is it possible to display the result, using the current regional locale

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "DrawGridLines", -1);
_ObjectSetProperty( calcedit , "FormatResult", " <fgcolor=808080>[=%l%]</fgcolor>");
_ObjectSetProperty( calcedit , "FormatTotalResult", " <b>[=%l%]</b>");
_ObjectCallMethod( calcedit , "InsertText", "100 * 100");
_ObjectCallMethod( calcedit , "InsertText", "200 * 200");
_ObjectCallMethod( calcedit , "InsertText", "300 * 300");
_ObjectCallMethod( calcedit , "InsertText", "Total");
|
22
|
How can I change the format to display the total result (right)

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "DrawGridLines", -1);
_ObjectSetProperty( calcedit , "FormatTotalResult", "<b><fgcolor=FF0000> = %l%</fgcolor></b>");
_ObjectSetProperty( calcedit , "AllowTotal", "<b><fgcolor=00FF00>Total</fgcolor></b>");
_ObjectCallMethod( calcedit , "InsertText", "100");
_ObjectCallMethod( calcedit , "InsertText", "200");
_ObjectCallMethod( calcedit , "InsertText", "300");
_ObjectCallMethod( calcedit , "InsertText", "Total");
|
21
|
How can I change the format to display the total result (right)

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "DrawGridLines", -1);
_ObjectSetProperty( calcedit , "LineHeight", "value + 4 * dpi");
_ObjectSetProperty( calcedit , "FormatTotalResult", "<r><b><font ;12>%l%</font></b>");
_ObjectSetProperty( calcedit , "AllowTotal", "<b><font ;12>Total</font></b>");
_ObjectCallMethod( calcedit , "InsertText", "100");
_ObjectCallMethod( calcedit , "InsertText", "200");
_ObjectCallMethod( calcedit , "InsertText", "300");
_ObjectCallMethod( calcedit , "InsertText", "Total");
|
20
|
Is it possible to rename the SubTotal

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "AllowSubTotal", "<fgcolor=FF0000>Current Amount");
_ObjectCallMethod( calcedit , "InsertText", "100");
_ObjectCallMethod( calcedit , "InsertText", "200");
_ObjectCallMethod( calcedit , "InsertText", "Current Amount");
_ObjectCallMethod( calcedit , "InsertText", "300");
_ObjectCallMethod( calcedit , "InsertText", "400");
_ObjectCallMethod( calcedit , "InsertText", "Current Amount");
_ObjectCallMethod( calcedit , "InsertText", "Total");
|
19
|
How can I disable the sub-totals

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "AllowSubTotal", "");
_ObjectCallMethod( calcedit , "InsertText", "100");
_ObjectCallMethod( calcedit , "InsertText", "200");
_ObjectCallMethod( calcedit , "InsertText", "SubTotal");
_ObjectCallMethod( calcedit , "InsertText", "300");
_ObjectCallMethod( calcedit , "InsertText", "400");
_ObjectCallMethod( calcedit , "InsertText", "SubTotal");
_ObjectCallMethod( calcedit , "InsertText", "Total");
|
18
|
How can I add sub-totals

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "AllowComments", "<fgcolor=008000>'");
_ObjectCallMethod( calcedit , "AddWildFormat", "<i>*=*<fgcolor=008000>'*");
_ObjectSetProperty( calcedit , "AllowVariables", "=");
_ObjectSetProperty( calcedit , "DrawGridLines", -1);
_ObjectSetProperty( calcedit , "LineHeight", "value + 8 * dpi");
_ObjectSetProperty( calcedit , "GridLineColor", 12895428);
_ObjectSetProperty( calcedit , "FormatLocal", "currency(value)");
_ObjectSetProperty( calcedit , "FormatTotalResult", "<r><b> = %l%</b>");
_ObjectSetProperty( calcedit , "FormatSubTotalResult", "<r><fgcolor=808080>[<b> = %l%</b>]");
_ObjectSetProperty( calcedit , "FormatResult", "<r><fgcolor=808080>(%l%)");
_ObjectSetProperty( calcedit , "BackColorTotal", 15790320);
_ObjectSetProperty( calcedit , "BackColorLockedLine", 0);
_ObjectSetProperty( calcedit , "ForeColorLockedLine", 0);
_ObjectSetProperty( calcedit , "CalcType", -1);
_ObjectSetProperty( calcedit , "Text", "100 + 200");
_ObjectCallMethod( calcedit , "InsertText", "200 * 1.5");
_ObjectCallMethod( calcedit , "InsertText", "SubA = SubTotal ' first subtotal");
_ObjectCallMethod( calcedit , "InsertText", "300 + (200+300)/2");
_ObjectCallMethod( calcedit , "InsertText", "400 + 500");
_ObjectCallMethod( calcedit , "InsertText", "SubB = SubTotal ' second subtotal");
_ObjectCallMethod( calcedit , "InsertLockedText", "VAT = Total * 0.19");
_ObjectCallMethod( calcedit , "InsertLockedText", "Commision = Total * 0.05");
_ObjectCallMethod( calcedit , "InsertLockedText", "NET = (Total - VAT) - Commision");
_ObjectCallMethod( calcedit , "InsertLockedText", "Total");
|
17
|
Is it possible to disable the Total

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "AllowTotal", "");
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectCallMethod( calcedit , "InsertText", "100");
_ObjectCallMethod( calcedit , "InsertText", "200");
_ObjectCallMethod( calcedit , "InsertText", "300");
_ObjectCallMethod( calcedit , "InsertText", "Total");
|
16
|
Is it possible to rename the Total to Sum

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "AllowTotal", "<fgcolor=FF0000><b>Sum</b></fgcolor>");
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectCallMethod( calcedit , "InsertText", "100");
_ObjectCallMethod( calcedit , "InsertText", "200");
_ObjectCallMethod( calcedit , "InsertText", "300");
_ObjectCallMethod( calcedit , "InsertText", "Sum");
|
15
|
Is it possible to add all lines

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectCallMethod( calcedit , "InsertText", "100");
_ObjectCallMethod( calcedit , "InsertText", "200");
_ObjectCallMethod( calcedit , "InsertText", "300");
_ObjectCallMethod( calcedit , "InsertText", "Total");
|
14
|
How do I insert / add a new line

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "Text", "100 * 1.5");
_ObjectCallMethod( calcedit , "InsertText", "120 * 2.5\r\n",1);
_ObjectCallMethod( calcedit , "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.
FUNCTION calceditEvents_SelChange()
Message( "CurrentLine: " );
Message( _ObjectGetProperty( calcedit , "CaretLine") );
Message( "CurrentLine: " );
Message( _ObjectCallMethod(calcedit, "ExecuteTemplate", "TextLine(CaretLine)") );
Message( "IsValid: " );
Message( _ObjectCallMethod(calcedit, "ExecuteTemplate", "IsValid(CaretLine)") );
END
OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
ObjectAssociateEvents("calceditEvents", calcedit);
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "Text", "100 * 1.5");
_ObjectCallMethod( calcedit , "InsertText", "invalid");
_ObjectCallMethod( calcedit , "InsertText", "120 * 1.5");
_ObjectCallMethod( calcedit , "InsertText", "130 * 1.5");
|
12
|
How do I get the current line

// SelChange event - Occurs when the user selects text in the control.
FUNCTION calceditEvents_SelChange()
Message( "CurrentLine: " );
Message( _ObjectGetProperty( calcedit , "CaretLine") );
Message( "CurrentLine: " );
Message( _ObjectCallMethod(calcedit, "ExecuteTemplate", "TextLine(CaretLine)") );
Message( "CurrentResult: " );
Message( _ObjectCallMethod(calcedit, "ExecuteTemplate", "Result(CaretLine)") );
END
OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
ObjectAssociateEvents("calceditEvents", calcedit);
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "Text", "100 * 1.5");
_ObjectCallMethod( calcedit , "InsertText", "120 * 1.5");
_ObjectCallMethod( calcedit , "InsertText", "130 * 1.5");
|
11
|
How do I get the line one by one, including the result

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "Text", "100 * 1.5");
_ObjectCallMethod( calcedit , "InsertText", "120 * 1.5");
_ObjectCallMethod( calcedit , "InsertText", "130 * 1.5");
Message( "Lines:" );
Message( _ObjectGetProperty( calcedit , "Count") );
Message( "TextLine(1):" );
Message( _ObjectCallMethod(calcedit, "ExecuteTemplate", "TextLine(1)") );
Message( "Result(1)" );
Message( _ObjectCallMethod(calcedit, "ExecuteTemplate", "Result(1)") );
Message( "TextLine(2):" );
Message( _ObjectCallMethod(calcedit, "ExecuteTemplate", "TextLine(2)") );
Message( "Result(2)" );
Message( _ObjectCallMethod(calcedit, "ExecuteTemplate", "Result(2)") );
Message( "TextLine(3):" );
Message( _ObjectCallMethod(calcedit, "ExecuteTemplate", "TextLine(3)") );
Message( "Result(3)" );
Message( _ObjectCallMethod(calcedit, "ExecuteTemplate", "Result(3)") );
|
10
|
Does the control supports multiple lines

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "MultiLine", -1);
_ObjectSetProperty( calcedit , "Text", "100 * 1.5");
_ObjectCallMethod( calcedit , "InsertText", "120 * 1.5");
_ObjectCallMethod( calcedit , "InsertText", "130 * 1.5");
|
9
|
Is it possible to display the result without brakets

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "FormatResult", "<fgcolor=808080> = %%</fgcolor>");
_ObjectSetProperty( calcedit , "Text", "12 + (12 / 100)/2");
|
8
|
How can I display the result on the right side of the control

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "FormatResult", "<r> <fgcolor=808080>[=%%]</fgcolor>");
_ObjectSetProperty( calcedit , "Text", "12 + (12 / 100)/2");
|
7
|
Can you please advise how to change fontname and size (sample 2)

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "Template", "Font.Size = 20; Font.Name = `Tahoma`; Refresh");
_ObjectSetProperty( calcedit , "Text", "1/2");
|
6
|
Can you please advise how to change fontname and size (sample 1)

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( _ObjectGetProperty( calcedit , "Font") , "Size", 20);
_ObjectSetProperty( calcedit , "Text", "1/2");
_ObjectCallMethod( calcedit , "Refresh");
|
5
|
How can I disable evaluating the selection

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "EvaluateSel", 0);
_ObjectSetProperty( calcedit , "HideSelection", 0);
_ObjectSetProperty( calcedit , "Text", "(1+6.25)/4*6/3");
_ObjectSetProperty( calcedit , "SelStart", 1);
_ObjectSetProperty( calcedit , "SelLength", 6);
_ObjectSetProperty( calcedit , "SelBackColor", 0);
|
4
|
Can I define a different decimal separator

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "AddDecimalSep", ",");
_ObjectSetProperty( calcedit , "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.
FUNCTION calceditEvents_Change()
Message( "Valid:" );
Message( _ObjectCallMethod(calcedit, "ExecuteTemplate", "IsValid()") );
_ObjectSetProperty( calcedit , "ForeColor", 255);
_ObjectSetProperty( calcedit , "FormatNumbers", "<fgcolor FF0000>");
_ObjectSetProperty( calcedit , "FormatResult", "");
END
OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
ObjectAssociateEvents("calceditEvents", calcedit);
_ObjectSetProperty( calcedit , "FormatInvalid", "");
_ObjectSetProperty( calcedit , "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.
FUNCTION calceditEvents_Change()
Message( "Valid:" );
Message( _ObjectCallMethod(calcedit, "ExecuteTemplate", "IsValid()") );
Message( "Expression: " );
Message( _ObjectGetProperty( calcedit , "Text") );
Message( "Result: " );
Message( _ObjectCallMethod(calcedit, "ExecuteTemplate", "Result()") );
END
OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
ObjectAssociateEvents("calceditEvents", calcedit);
_ObjectSetProperty( calcedit , "Text", "(1+6.25)/4*6/3");
|
1
|
How do I programatically save / load the expression and the result

OBJECT calcedit;
calcedit = ObjectByName("AN1") ;
_ObjectSetProperty( calcedit , "Text", "(1+6.25)/4*6/3");
Message( "Expression: " );
Message( _ObjectGetProperty( calcedit , "Text") );
Message( "Result: " );
Message( _ObjectCallMethod(calcedit, "ExecuteTemplate", "Result()") );
|