78
|
Is it possible to change the line's height
![](images/excalceditq78.png)
With AxCalcEdit1
.MultiLine = True
.Text = "(1+6.25)/4*6/3"
.InsertText("(2+6.25)/4*6/3\r\n",1)
.InsertText("(3+6.25)/4*6/3\r\n",1)
.InsertText("(4+6.25)/4*6/3\r\n",1)
.InsertText("Total")
.LineHeight = "value + 8 * dpi"
.DrawGridLines = True
End With
|
77
|
How do I put a picture on the control's background
![](images/excalceditq77.png)
With AxCalcEdit1
.Picture = AxCalcEdit1.ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)")
.PictureDisplay = EXCALCEDITLib.PictureDisplayEnum.exUpperLeft
.MultiLine = True
.Text = "(1+6.25)/4*6/3"
.InsertText("\r\n",1)
.InsertText("\r\n",1)
.InsertText("\r\n",1)
Debug.Print( "Expression: " )
Debug.Print( .Text )
Debug.Print( "Result: " )
Debug.Print( .get_Result() )
End With
|
76
|
How do I get the numbers only, with no Total fields (method 2)
![](images/excalceditq76.png)
With AxCalcEdit1
.MultiLine = True
.FormatResult = "<fgcolor=808080><r> = %%"
.InsertText("100 * 200")
.InsertText("300 * 400 * 1.5")
.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)")
.InsertText("Total")
Debug.Print( .ExecuteTemplate("FormatABC(""lower(A) replace `total` with ``"", Text)") )
End With
|
75
|
How do I get the numbers only, with no Total fields (method 1)
![](images/excalceditq75.png)
With AxCalcEdit1
.MultiLine = True
.FormatResult = "<fgcolor=808080><r> = %%"
.InsertText("100 * 200")
.InsertText("300 * 400 * 1.5")
.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)")
.InsertText("Total")
Debug.Print( .FormatABC("lower(A) replace `total` with ``",.Text) )
End With
|
74
|
How do I customize the format to display the result (right,local,2 decimals,less,font)
![](images/excalceditq74.png)
With AxCalcEdit1
.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")
.InsertText("300 * 400 * 1.5")
.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)")
End With
|
73
|
How do I customize the format to display the result (right,local,2 decimals,greater,color)
![](images/excalceditq73.png)
With AxCalcEdit1
.MultiLine = True
.FormatLocal = "( value > 10000 ? `<fgcolor=FF0000><b>` : ``) + (value format `2`)"
.FormatResult = "<fgcolor=808080><r> = %l%"
.InsertText("100 * 200")
.InsertText("300 * 400 * 1.5")
.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)")
End With
|
72
|
How do I customize the format to display the result (right,local,all decimals)
![](images/excalceditq72.png)
With AxCalcEdit1
.MultiLine = True
.FormatLocal = "value"
.FormatResult = "<fgcolor=808080><r> = %l%"
.InsertText("100 * 200")
.InsertText("300 * 400 * 1.5")
.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)")
End With
|
71
|
How do I customize the format to display the result (right,local,2 decimals)
![](images/excalceditq71.png)
With AxCalcEdit1
.MultiLine = True
.FormatLocal = "value format `2`"
.FormatResult = "<fgcolor=808080><r> = %l%"
.InsertText("100 * 200")
.InsertText("300 * 400 * 1.5")
.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)")
End With
|
70
|
How do I customize the format to display the result (right,local,curency)
![](images/excalceditq70.png)
With AxCalcEdit1
.MultiLine = True
.FormatLocal = "currency(value)"
.FormatResult = "<fgcolor=808080><r> = %l%"
.InsertText("100 * 200")
.InsertText("300 * 400 * 1.5")
.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)")
End With
|
69
|
How do I customize the format to display the result (right,local)
![](images/excalceditq69.png)
With AxCalcEdit1
.MultiLine = True
.FormatResult = "<fgcolor=808080><r> = %l%"
.InsertText("100 * 200")
.InsertText("300 * 400 * 1.5")
.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)")
End With
|
68
|
How do I customize the format to display the result (right)
![](images/excalceditq68.png)
With AxCalcEdit1
.MultiLine = True
.FormatResult = "<fgcolor=808080><r> = %%"
.InsertText("100 * 200")
.InsertText("300 * 400 * 1.5")
.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)")
End With
|
67
|
How do I customize the format to display the result (default)
![](images/excalceditq67.png)
With AxCalcEdit1
.MultiLine = True
.InsertText("100 * 200")
.InsertText("300 * 400 * 1.5")
.InsertText("200 + ( 400 * 1.5 + 300 / 1.19)")
End With
|
66
|
How can I force a line to be there all the time, so user can not delete it, for instance Total
![](images/excalceditq66.png)
With AxCalcEdit1
.MultiLine = True
.InsertLockedText("Total")
.InsertText("100")
.InsertText("200")
.InsertText("300")
End With
|
65
|
Is it possible to get the value of specified variable
![](images/excalceditq65.png)
With AxCalcEdit1
.MultiLine = True
.InsertText("100")
.InsertText("200")
.InsertText("300")
.InsertText("TVA = Total * 0.19")
.InsertText("Total")
Debug.Print( "The TVA is: " )
Debug.Print( .get_Variable("TVA") )
End With
|
64
|
How do I get the total
![](images/excalceditq64.png)
With AxCalcEdit1
.MultiLine = True
.InsertText("100")
.InsertText("200")
.InsertText("300")
.InsertText("Total")
Debug.Print( "The total is: " )
Debug.Print( .get_Variable("Total") )
End With
|
63
|
How do I get the easter date
![](images/excalceditq63.png)
With AxCalcEdit1
.MultiLine = True
.CalcType = EXCALCEDITLib.CalcTypeEnum.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)")
.InsertLockedText("V2 = ((V1 + 21) + (V1 > 48 ? -1 : 0) + 6 - ((Year + int(Year / 4)) + V1 + (V1 > 48 ? -1 : 0) + 1) mod 7)")
.InsertLockedText("EasterSundayDay = date(dateS('3/1/' + Year) + V2)")
Debug.Print( "Easter Sunday Day is " )
Debug.Print( .get_Variable("EasterSundayDay") )
Debug.Print( " for year " )
Debug.Print( .get_Variable("Year") )
End With
|
62
|
I've got a red line while I type into the control. How can I disable that (sample 2)
![](images/excalceditq62.png)
With AxCalcEdit1
.AllowFormatInvalidOnTyping = False
.MultiLine = True
.Text = "100 + 200(invalid)"
End With
|
61
|
I've got a red line while I type into the control. How can I disable that (sample 1)
![](images/excalceditq61.png)
With AxCalcEdit1
.FormatInvalid = ""
.Text = "100 + 200(invalid)"
End With
|
60
|
How do I specify the color to show the locked lines
![](images/excalceditq60.png)
With AxCalcEdit1
.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")
.InsertText("200")
.InsertLockedText("VAT = Total * 0.20")
.InsertLockedText("Total")
End With
|
59
|
Can I remove the colors that indicates locked lines
![](images/excalceditq59.png)
With AxCalcEdit1
.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")
.InsertText("200")
.InsertLockedText("VAT = Total * 0.20")
.InsertLockedText("Total")
End With
|
58
|
Can I add lines to the control, so the user can not remove/delete them ( locked lines )
![](images/excalceditq58.png)
With AxCalcEdit1
.MultiLine = True
.CalcType = EXCALCEDITLib.CalcTypeEnum.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")
.InsertLockedText("Commission = Total * 0.05 + (Total ? 2.95 : 0)")
.InsertLockedText("Total")
End With
|
57
|
Is it possible to highlight a specified line
![](images/excalceditq57.png)
With AxCalcEdit1
.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")
.InsertText("300 + 3 * 15")
.InsertText("400 + 200 * (10 + 12/45)")
.InsertText("50 * 45")
.InsertText("VAT = Total * 0.19")
.InsertText("NET = Total - VAT")
.InsertText("Monthly = Total / 12")
.InsertText("Commission = Total * 0.05 + 2.95")
.InsertText("Total")
End With
|
56
|
Is it possible to display the result as currency
![](images/excalceditq56.png)
With AxCalcEdit1
.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")
.InsertText("300")
.InsertText("400")
.InsertText("VAT = Total * 0.19")
.InsertText("NET = Total - VAT")
.InsertText("Total")
End With
|
55
|
Is it possible to display the result with no decimals
![](images/excalceditq55.png)
With AxCalcEdit1
.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")
.InsertText("300")
.InsertText("400")
.InsertText("VAT = Total * 0.19")
.InsertText("NET = Total - VAT")
.InsertText("Total")
End With
|
54
|
Is it possible to display the result exactly how it is defined in the control panel
![](images/excalceditq54.png)
With AxCalcEdit1
.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")
.InsertText("300")
.InsertText("400")
.InsertText("VAT = Total * 0.19")
.InsertText("NET = Total - VAT")
.InsertText("Total")
End With
|
53
|
How can I count the lines
![](images/excalceditq53.png)
With AxCalcEdit1
.MultiLine = True
.AllowCount = "count"
.AllowSubCount = "subcount"
.DrawGridLines = True
.LineHeight = "value + 8 * dpi"
.GridLineColor = RGB(196,196,196)
.InsertText("100")
.InsertText("200")
.InsertText("SubCount")
.InsertText("300")
.InsertText("400")
.InsertText("500")
.InsertText("SubCount")
.InsertText("Count")
End With
|
52
|
How can I compute the average
With AxCalcEdit1
.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")
.InsertText("200")
.InsertText("300")
.InsertText("400")
.InsertText("VAT = Total * 0.19")
.InsertText("NET = Total - VAT")
.InsertText("Total")
End With
|
51
|
Variables or Computed Fields
![](images/excalceditq51.png)
With AxCalcEdit1
.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")
.InsertText("300")
.InsertText("400")
.InsertText("VAT = Total * 0.19")
.InsertText("NET = Total - VAT")
.InsertText("Total")
End With
|
50
|
I have noticed that definition of the variable is shown in italics. Can I change that
![](images/excalceditq50.png)
With AxCalcEdit1
.MultiLine = True
.AllowVariables = "="
.ClearWildFormats()
.AddWildFormat("<b>*=*")
.Text = "A = 400"
.InsertText("")
.InsertText("B = A + 0.22")
.InsertText("A + B")
.InsertText("B = B * .19")
.InsertText("A + B")
End With
|
49
|
I have noticed that definition of the variable is shown in italics. Can I remove that
![](images/excalceditq49.png)
With AxCalcEdit1
.MultiLine = True
.AllowVariables = "="
.ClearWildFormats()
.Text = "A = 300"
.InsertText("")
.InsertText("B = A + 0.22")
.InsertText("A + B")
.InsertText("B = B * .19")
.InsertText("A + B")
End With
|
48
|
Can I define variables (sample 2)
![](images/excalceditq48.png)
With AxCalcEdit1
.MultiLine = True
.AllowVariables = "is"
.ClearWildFormats()
.AddWildFormat("<b>*is*")
.Text = "A is 200"
.InsertText("")
.InsertText("B is A + 0.22")
.InsertText("A + B")
.InsertText("B is B * .19")
.InsertText("A + B")
End With
|
47
|
Can I define variables (sample 1)
![](images/excalceditq47.png)
With AxCalcEdit1
.MultiLine = True
.AllowVariables = "="
.Text = "A = 100.22"
.InsertText("")
.InsertText("B = A + 0.22")
.InsertText("A + B")
.InsertText("B = B * .19")
.InsertText("A + B")
End With
|
46
|
Comments and Prefixes
![](images/excalceditq46.png)
With AxCalcEdit1
.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")
.InsertText("Total")
End With
|
45
|
Can I display something at the start of each line
![](images/excalceditq45.png)
With AxCalcEdit1
.MultiLine = True
.AllowPrefixes = "<b>:</b>"
.Text = "Field A: 100"
.InsertText("Field B: 200")
.InsertText("Total")
End With
|
44
|
I can not use TAB key. Is it possible
With AxCalcEdit1
.UseTabKey = True
End With
|
43
|
Does your control support comments
![](images/excalceditq43.png)
With AxCalcEdit1
.MultiLine = True
.CalcType = EXCALCEDITLib.CalcTypeEnum.exCalcIncludeAll
.AllowComments = "<fgcolor=008080>//</fgcolor>"
.Text = "104 mod 51 // modulo function"
.InsertText("int(104/51) // int function")
.InsertText("51 * int(104/51) + (104 mod 51) // check")
End With
|
42
|
Can I use the modulo function ( rest )
![](images/excalceditq42.png)
With AxCalcEdit1
.MultiLine = True
.CalcType = EXCALCEDITLib.CalcTypeEnum.exCalcIncludeAll
.Text = "104 mod 51"
.InsertText("int(104/51)")
.InsertText("51 * int(104/51) + (104 mod 51)")
End With
|
41
|
Can I use acos function
![](images/excalceditq41.png)
With AxCalcEdit1
.CalcType = EXCALCEDITLib.CalcTypeEnum.exCalcIncludeAll
.Text = "acos(cos(1))"
End With
|
40
|
Can I use asin function
![](images/excalceditq40.png)
With AxCalcEdit1
.CalcType = EXCALCEDITLib.CalcTypeEnum.exCalcIncludeAll
.Text = "asin(sin(1))"
End With
|
39
|
Can I use cos function
![](images/excalceditq39.png)
With AxCalcEdit1
.CalcType = EXCALCEDITLib.CalcTypeEnum.exCalcIncludeAll
.Text = "cos(1)"
End With
|
38
|
Can I use sin function
![](images/excalceditq38.png)
With AxCalcEdit1
.CalcType = EXCALCEDITLib.CalcTypeEnum.exCalcIncludeAll
.Text = "sin(1)"
End With
|
37
|
Can I use abs function (absolute part of the number)
![](images/excalceditq37.png)
With AxCalcEdit1
.CalcType = EXCALCEDITLib.CalcTypeEnum.exCalcIncludeAll
.Text = "abs(-100.99)"
End With
|
36
|
Can I use round function
![](images/excalceditq36.png)
With AxCalcEdit1
.CalcType = EXCALCEDITLib.CalcTypeEnum.exCalcIncludeAll
.Text = "round(100.99)"
End With
|
35
|
Can I use int function (integer part of a number)
![](images/excalceditq35.png)
With AxCalcEdit1
.CalcType = EXCALCEDITLib.CalcTypeEnum.exCalcIncludeAll
.Text = "int(100.99)"
End With
|
34
|
Can I use sqrt function (square root of a number)
![](images/excalceditq34.png)
With AxCalcEdit1
.CalcType = EXCALCEDITLib.CalcTypeEnum.exCalcIncludeAll
.Text = "sqrt(100)"
End With
|
33
|
How can I show invalid lines with a larger font
![](images/excalceditq33.png)
With AxCalcEdit1
.MultiLine = True
.LineHeight = "value + 8 *dpi"
.DrawGridLines = True
.FormatInvalid = "<u><font ;12> </font></u>"
.InsertText("100")
.InsertText("k200")
.InsertText("300")
End With
|
32
|
I've noticed that while I type the text is shown in red. How can I change that
![](images/excalceditq32.png)
With AxCalcEdit1
.FormatInvalid = ""
.Text = "100 * 200"
End With
|
31
|
Can I enlarge the height of each line
![](images/excalceditq31.png)
With AxCalcEdit1
.MultiLine = True
.LineHeight = "value + 8 * dpi"
.DrawGridLines = True
.InsertText("100")
.InsertText("200")
.InsertText("300")
.InsertText("Total")
End With
|
30
|
How can I show grid lines
![](images/excalceditq30.png)
With AxCalcEdit1
.MultiLine = True
.DrawGridLines = True
.GridLineColor = RGB(0,0,0)
.InsertText("100")
.InsertText("200")
.InsertText("300")
.InsertText("Total")
End With
|
29
|
How can I display the result of the total with a larger font
![](images/excalceditq29.png)
With AxCalcEdit1
.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")
.InsertText("200")
.InsertText("300")
.InsertText("Total")
End With
|
28
|
Is it possible to show the Total / SubTotal with a different background color
![](images/excalceditq28.png)
With AxCalcEdit1
.MultiLine = True
.AllowTotal = "<bgcolor=A0A0A0><b>Total</b></bgcolor>"
.AllowSubTotal = "<bgcolor=E0E0E0><b>SubTotal</b></bgcolor>"
.InsertText("100")
.InsertText("200")
.InsertText("SubTotal")
.InsertText("300")
.InsertText("400 * 1.5")
.InsertText("SubTotal")
.InsertText("Total")
End With
|
27
|
Is it possible to show the Total / SubTotal with a different background color
![](images/excalceditq27.png)
With AxCalcEdit1
.MultiLine = True
.BackColorTotal = RGB(196,196,196)
.BackColorSubTotal = RGB(240,240,240)
.InsertText("100")
.InsertText("200")
.InsertText("SubTotal")
.InsertText("300")
.InsertText("400 * 1.5")
.InsertText("SubTotal")
.InsertText("Total")
End With
|
26
|
How can I change the color to show the numbers
![](images/excalceditq26.png)
With AxCalcEdit1
.FormatNumbers = "<fgcolor=FF0000> </fgcolor>"
.Text = "1 + 2 + 3 + 4"
End With
|
25
|
The numbers are shown in blue. How can I remove that
![](images/excalceditq25.png)
With AxCalcEdit1
.FormatNumbers = ""
.Text = "1 + 2 + 3 + 4"
End With
|
24
|
How can I export the entire text, including the result
![](images/excalceditq24.png)
With AxCalcEdit1
.MultiLine = True
.Text = "100 * 1.5"
.InsertText("120 * 1.5")
.InsertText("130 * 1.5")
.InsertText("Total")
Debug.Print( .Export )
End With
|
23
|
Is it possible to display the result, using the current regional locale
![](images/excalceditq23.png)
With AxCalcEdit1
.MultiLine = True
.DrawGridLines = True
.FormatResult = " <fgcolor=808080>[=%l%]</fgcolor>"
.FormatTotalResult = " <b>[=%l%]</b>"
.InsertText("100 * 100")
.InsertText("200 * 200")
.InsertText("300 * 300")
.InsertText("Total")
End With
|
22
|
How can I change the format to display the total result (right)
![](images/excalceditq22.png)
With AxCalcEdit1
.MultiLine = True
.DrawGridLines = True
.FormatTotalResult = "<b><fgcolor=FF0000> = %l%</fgcolor></b>"
.AllowTotal = "<b><fgcolor=00FF00>Total</fgcolor></b>"
.InsertText("100")
.InsertText("200")
.InsertText("300")
.InsertText("Total")
End With
|
21
|
How can I change the format to display the total result (right)
![](images/excalceditq21.png)
With AxCalcEdit1
.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")
.InsertText("200")
.InsertText("300")
.InsertText("Total")
End With
|
20
|
Is it possible to rename the SubTotal
![](images/excalceditq20.png)
With AxCalcEdit1
.MultiLine = True
.AllowSubTotal = "<fgcolor=FF0000>Current Amount"
.InsertText("100")
.InsertText("200")
.InsertText("Current Amount")
.InsertText("300")
.InsertText("400")
.InsertText("Current Amount")
.InsertText("Total")
End With
|
19
|
How can I disable the sub-totals
![](images/excalceditq19.png)
With AxCalcEdit1
.MultiLine = True
.AllowSubTotal = ""
.InsertText("100")
.InsertText("200")
.InsertText("SubTotal")
.InsertText("300")
.InsertText("400")
.InsertText("SubTotal")
.InsertText("Total")
End With
|
18
|
How can I add sub-totals
![](images/excalceditq18.png)
With AxCalcEdit1
.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.CalcTypeEnum.exCalcIncludeAll
.Text = "100 + 200"
.InsertText("200 * 1.5")
.InsertText("SubA = SubTotal ' first subtotal")
.InsertText("300 + (200+300)/2")
.InsertText("400 + 500")
.InsertText("SubB = SubTotal ' second subtotal")
.InsertLockedText("VAT = Total * 0.19")
.InsertLockedText("Commision = Total * 0.05")
.InsertLockedText("NET = (Total - VAT) - Commision")
.InsertLockedText("Total")
End With
|
17
|
Is it possible to disable the Total
![](images/excalceditq17.png)
With AxCalcEdit1
.AllowTotal = ""
.MultiLine = True
.InsertText("100")
.InsertText("200")
.InsertText("300")
.InsertText("Total")
End With
|
16
|
Is it possible to rename the Total to Sum
![](images/excalceditq16.png)
With AxCalcEdit1
.AllowTotal = "<fgcolor=FF0000><b>Sum</b></fgcolor>"
.MultiLine = True
.InsertText("100")
.InsertText("200")
.InsertText("300")
.InsertText("Sum")
End With
|
15
|
Is it possible to add all lines
![](images/excalceditq15.png)
With AxCalcEdit1
.MultiLine = True
.InsertText("100")
.InsertText("200")
.InsertText("300")
.InsertText("Total")
End With
|
14
|
How do I insert / add a new line
![](images/excalceditq14.png)
With AxCalcEdit1
.MultiLine = True
.Text = "100 * 1.5"
.InsertText("120 * 2.5\r\n",1)
.InsertText("200 * 1.5")
End With
|
13
|
How do I find out if a specified line is valid
![](images/excalceditq13.png)
' SelChange event - Occurs when the user selects text in the control.
Private Sub AxCalcEdit1_SelChange(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxCalcEdit1.SelChange
With AxCalcEdit1
Debug.Print( "CurrentLine: " )
Debug.Print( .CaretLine )
Debug.Print( "CurrentLine: " )
Debug.Print( .get_TextLine(.CaretLine) )
Debug.Print( "IsValid: " )
Debug.Print( .get_IsValid(.CaretLine) )
End With
End Sub
With AxCalcEdit1
.MultiLine = True
.Text = "100 * 1.5"
.InsertText("invalid")
.InsertText("120 * 1.5")
.InsertText("130 * 1.5")
End With
|
12
|
How do I get the current line
![](images/excalceditq12.png)
' SelChange event - Occurs when the user selects text in the control.
Private Sub AxCalcEdit1_SelChange(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxCalcEdit1.SelChange
With AxCalcEdit1
Debug.Print( "CurrentLine: " )
Debug.Print( .CaretLine )
Debug.Print( "CurrentLine: " )
Debug.Print( .get_TextLine(.CaretLine) )
Debug.Print( "CurrentResult: " )
Debug.Print( .get_Result(.CaretLine) )
End With
End Sub
With AxCalcEdit1
.MultiLine = True
.Text = "100 * 1.5"
.InsertText("120 * 1.5")
.InsertText("130 * 1.5")
End With
|
11
|
How do I get the line one by one, including the result
![](images/excalceditq11.png)
With AxCalcEdit1
.MultiLine = True
.Text = "100 * 1.5"
.InsertText("120 * 1.5")
.InsertText("130 * 1.5")
Debug.Print( "Lines:" )
Debug.Print( .Count )
Debug.Print( "TextLine(1):" )
Debug.Print( .get_TextLine(1) )
Debug.Print( "Result(1)" )
Debug.Print( .get_Result(1) )
Debug.Print( "TextLine(2):" )
Debug.Print( .get_TextLine(2) )
Debug.Print( "Result(2)" )
Debug.Print( .get_Result(2) )
Debug.Print( "TextLine(3):" )
Debug.Print( .get_TextLine(3) )
Debug.Print( "Result(3)" )
Debug.Print( .get_Result(3) )
End With
|
10
|
Does the control supports multiple lines
![](images/excalceditq10.png)
With AxCalcEdit1
.MultiLine = True
.Text = "100 * 1.5"
.InsertText("120 * 1.5")
.InsertText("130 * 1.5")
End With
|
9
|
Is it possible to display the result without brakets
![](images/excalceditq9.png)
With AxCalcEdit1
.FormatResult = "<fgcolor=808080> = %%</fgcolor>"
.Text = "12 + (12 / 100)/2"
End With
|
8
|
How can I display the result on the right side of the control
![](images/excalceditq8.png)
With AxCalcEdit1
.FormatResult = "<r> <fgcolor=808080>[=%%]</fgcolor>"
.Text = "12 + (12 / 100)/2"
End With
|
7
|
Can you please advise how to change fontname and size (sample 2)
![](images/excalceditq7.png)
With AxCalcEdit1
.Template = "Font.Size = 20; Font.Name = `Tahoma`; Refresh"
.Text = "1/2"
End With
|
6
|
Can you please advise how to change fontname and size (sample 1)
![](images/excalceditq6.png)
With AxCalcEdit1
.Font.Size = 20
.Text = "1/2"
.Refresh()
End With
|
5
|
How can I disable evaluating the selection
![](images/excalceditq5.png)
With AxCalcEdit1
.EvaluateSel = False
.HideSelection = False
.Text = "(1+6.25)/4*6/3"
.SelStart = 1
.SelLength = 6
.SelBackColor = RGB(0,0,0)
End With
|
4
|
Can I define a different decimal separator
![](images/excalceditq4.png)
With AxCalcEdit1
.AddDecimalSep = ","
.Text = "(1+6,25)/4*6/3"
End With
|
3
|
How do I change the color of the entire control, if the expression is not valid
![](images/excalceditq3.png)
' Change event - Indicates that the control's text has changed.
Private Sub AxCalcEdit1_Change(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxCalcEdit1.Change
With AxCalcEdit1
Debug.Print( "Valid:" )
Debug.Print( .get_IsValid() )
.ForeColor = RGB(255,0,0)
.FormatNumbers = "<fgcolor FF0000>"
.FormatResult = ""
End With
End Sub
With AxCalcEdit1
.FormatInvalid = ""
.Text = "invalid(1+6.25)/4*6/3"
End With
|
2
|
Is there any function to know if the expression is valid
![](images/excalceditq2.png)
' Change event - Indicates that the control's text has changed.
Private Sub AxCalcEdit1_Change(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxCalcEdit1.Change
With AxCalcEdit1
Debug.Print( "Valid:" )
Debug.Print( .get_IsValid() )
Debug.Print( "Expression: " )
Debug.Print( .Text )
Debug.Print( "Result: " )
Debug.Print( .get_Result() )
End With
End Sub
With AxCalcEdit1
.Text = "(1+6.25)/4*6/3"
End With
|
1
|
How do I programatically save / load the expression and the result
![](images/excalceditq1.png)
With AxCalcEdit1
.Text = "(1+6.25)/4*6/3"
Debug.Print( "Expression: " )
Debug.Print( .Text )
Debug.Print( "Result: " )
Debug.Print( .get_Result() )
End With
|