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

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComText to "(1+6.25)/4*6/3"
Send ComInsertText "(2+6.25)/4*6/3\r\n" 1
Send ComInsertText "(3+6.25)/4*6/3\r\n" 1
Send ComInsertText "(4+6.25)/4*6/3\r\n" 1
Send ComInsertText "Total" Nothing
Set ComLineHeight to "value + 8 * dpi"
Set ComDrawGridLines to True
End_Procedure
|
77
|
How do I put a picture on the control's background

Procedure OnCreate
Forward Send OnCreate
Variant vPicture
Get ComExecuteTemplate "loadpicture(`c:\exontrol\images\zipdisk.gif`)" to vPicture
Set ComPicture to (vPicture)
Set ComPictureDisplay to OLEexUpperLeft
Set ComMultiLine to True
Set ComText to "(1+6.25)/4*6/3"
Send ComInsertText "\r\n" 1
Send ComInsertText "\r\n" 1
Send ComInsertText "\r\n" 1
Showln "Expression: " (ComText(Self))
Showln "Result: " (ComResult(Self,Nothing))
End_Procedure
|
76
|
How do I get the numbers only, with no Total fields (method 2)

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComFormatResult to "<fgcolor=808080><r> = %%"
Send ComInsertText "100 * 200" Nothing
Send ComInsertText "300 * 400 * 1.5" Nothing
Send ComInsertText "200 + ( 400 * 1.5 + 300 / 1.19)" Nothing
Send ComInsertText "Total" Nothing
Showln (ComExecuteTemplate(Self,"FormatABC("lower(A) replace `total` with ``", Text)"))
End_Procedure
|
75
|
How do I get the numbers only, with no Total fields (method 1)

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComFormatResult to "<fgcolor=808080><r> = %%"
Send ComInsertText "100 * 200" Nothing
Send ComInsertText "300 * 400 * 1.5" Nothing
Send ComInsertText "200 + ( 400 * 1.5 + 300 / 1.19)" Nothing
Send ComInsertText "Total" Nothing
Showln (ComFormatABC(Self,"lower(A) replace `total` with ``",(ComText(Self)),Nothing,Nothing))
End_Procedure
|
74
|
How do I customize the format to display the result (right,local,2 decimals,less,font)

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComLineHeight to "value + 8 * dpi"
Set ComFormatLocal to "( value < 10000 ? `<fgcolor=000000><b><font ;16>` : ``) + (value format `2`)"
Set ComFormatResult to "<fgcolor=808080><r> = %l%"
Send ComInsertText "100 * 200" Nothing
Send ComInsertText "300 * 400 * 1.5" Nothing
Send ComInsertText "200 + ( 400 * 1.5 + 300 / 1.19)" Nothing
End_Procedure
|
73
|
How do I customize the format to display the result (right,local,2 decimals,greater,color)

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComFormatLocal to "( value > 10000 ? `<fgcolor=FF0000><b>` : ``) + (value format `2`)"
Set ComFormatResult to "<fgcolor=808080><r> = %l%"
Send ComInsertText "100 * 200" Nothing
Send ComInsertText "300 * 400 * 1.5" Nothing
Send ComInsertText "200 + ( 400 * 1.5 + 300 / 1.19)" Nothing
End_Procedure
|
72
|
How do I customize the format to display the result (right,local,all decimals)

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComFormatLocal to "value"
Set ComFormatResult to "<fgcolor=808080><r> = %l%"
Send ComInsertText "100 * 200" Nothing
Send ComInsertText "300 * 400 * 1.5" Nothing
Send ComInsertText "200 + ( 400 * 1.5 + 300 / 1.19)" Nothing
End_Procedure
|
71
|
How do I customize the format to display the result (right,local,2 decimals)

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComFormatLocal to "value format `2`"
Set ComFormatResult to "<fgcolor=808080><r> = %l%"
Send ComInsertText "100 * 200" Nothing
Send ComInsertText "300 * 400 * 1.5" Nothing
Send ComInsertText "200 + ( 400 * 1.5 + 300 / 1.19)" Nothing
End_Procedure
|
70
|
How do I customize the format to display the result (right,local,curency)

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComFormatLocal to "currency(value)"
Set ComFormatResult to "<fgcolor=808080><r> = %l%"
Send ComInsertText "100 * 200" Nothing
Send ComInsertText "300 * 400 * 1.5" Nothing
Send ComInsertText "200 + ( 400 * 1.5 + 300 / 1.19)" Nothing
End_Procedure
|
69
|
How do I customize the format to display the result (right,local)

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComFormatResult to "<fgcolor=808080><r> = %l%"
Send ComInsertText "100 * 200" Nothing
Send ComInsertText "300 * 400 * 1.5" Nothing
Send ComInsertText "200 + ( 400 * 1.5 + 300 / 1.19)" Nothing
End_Procedure
|
68
|
How do I customize the format to display the result (right)

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComFormatResult to "<fgcolor=808080><r> = %%"
Send ComInsertText "100 * 200" Nothing
Send ComInsertText "300 * 400 * 1.5" Nothing
Send ComInsertText "200 + ( 400 * 1.5 + 300 / 1.19)" Nothing
End_Procedure
|
67
|
How do I customize the format to display the result (default)

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Send ComInsertText "100 * 200" Nothing
Send ComInsertText "300 * 400 * 1.5" Nothing
Send ComInsertText "200 + ( 400 * 1.5 + 300 / 1.19)" Nothing
End_Procedure
|
66
|
How can I force a line to be there all the time, so user can not delete it, for instance Total

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Send ComInsertLockedText "Total" Nothing
Send ComInsertText "100" Nothing
Send ComInsertText "200" Nothing
Send ComInsertText "300" Nothing
End_Procedure
|
65
|
Is it possible to get the value of specified variable

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Send ComInsertText "100" Nothing
Send ComInsertText "200" Nothing
Send ComInsertText "300" Nothing
Send ComInsertText "TVA = Total * 0.19" Nothing
Send ComInsertText "Total" Nothing
Showln "The TVA is: " (ComVariable(Self,"TVA"))
End_Procedure
|
64
|
How do I get the total

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Send ComInsertText "100" Nothing
Send ComInsertText "200" Nothing
Send ComInsertText "300" Nothing
Send ComInsertText "Total" Nothing
Showln "The total is: " (ComVariable(Self,"Total"))
End_Procedure
|
63
|
How do I get the easter date

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComCalcType to OLEexCalcIncludeAll
Send ComClearWildFormats
Set ComFormatResult to "<r><fgcolor=008000><b>(%%)"
Set ComAllowComments to "<fgcolor=008000>//"
Send ComAddWildFormat "*=*<fgcolor=008000>//*"
Send ComAddWildFormat "<fgcolor=808080>V*=*"
Send ComAddWildFormat "<b>EasterSundayDay*=*"
Set ComBackColorLockedLine to (RGB(0,0,0))
Set ComForeColorLockedLine to (RGB(0,0,0))
Set ComText to "Year = 2018 // change here the year, to get the Easter Sunday for giving year"
Send ComInsertLockedText "V1 = (((255 - 11 * (Year mod 19)) - 21) mod 30)" Nothing
Send ComInsertLockedText "V2 = ((V1 + 21) + (V1 > 48 ? -1 : 0) + 6 - ((Year + int(Year / 4)) + V1 + (V1 > 48 ? -1 : 0) + 1) mod 7)" Nothing
Send ComInsertLockedText "EasterSundayDay = date(dateS('3/1/' + Year) + V2)" Nothing
Showln "Easter Sunday Day is " (ComVariable(Self,"EasterSundayDay")) " for year " (ComVariable(Self,"Year"))
End_Procedure
|
62
|
I've got a red line while I type into the control. How can I disable that (sample 2)

Procedure OnCreate
Forward Send OnCreate
Set ComAllowFormatInvalidOnTyping to False
Set ComMultiLine to True
Set ComText to "100 + 200(invalid)"
End_Procedure
|
61
|
I've got a red line while I type into the control. How can I disable that (sample 1)

Procedure OnCreate
Forward Send OnCreate
Set ComFormatInvalid to ""
Set ComText to "100 + 200(invalid)"
End_Procedure
|
60
|
How do I specify the color to show the locked lines

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComAllowVariables to "="
Set ComDrawGridLines to True
Set ComLineHeight to "value + 8 * dpi"
Set ComGridLineColor to (RGB(196,196,196))
Set ComFormatResult to "<r>[=%l%]"
Set ComFormatLocal to "currency(value)"
Set ComFormatTotalResult to "<r><b> <fgcolor=FFFFFF>= %l%</b>"
Set ComBackColorLockedLine to (RGB(0,0,1))
Set ComForeColorLockedLine to (RGB(255,255,255))
Send ComInsertText "100" Nothing
Send ComInsertText "200" Nothing
Send ComInsertLockedText "VAT = Total * 0.20" Nothing
Send ComInsertLockedText "Total" Nothing
End_Procedure
|
59
|
Can I remove the colors that indicates locked lines

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComAllowVariables to "="
Set ComDrawGridLines to True
Set ComLineHeight to "value + 8 * dpi"
Set ComGridLineColor to (RGB(196,196,196))
Set ComFormatResult to "<r><fgcolor=808080>[=%l%]"
Set ComFormatLocal to "currency(value)"
Set ComFormatTotalResult to "<r><b> = %l%</b>"
Set ComBackColorLockedLine to (RGB(0,0,0))
Set ComForeColorLockedLine to (RGB(0,0,0))
Send ComInsertText "100" Nothing
Send ComInsertText "200" Nothing
Send ComInsertLockedText "VAT = Total * 0.20" Nothing
Send ComInsertLockedText "Total" Nothing
End_Procedure
|
58
|
Can I add lines to the control, so the user can not remove/delete them ( locked lines )

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComCalcType to OLEexCalcIncludeAll
Set ComAllowVariables to "="
Set ComDrawGridLines to True
Set ComLineHeight to "value + 8 * dpi"
Set ComGridLineColor to (RGB(196,196,196))
Set ComFormatResult to "<r><fgcolor=808080>[=%l%]"
Set ComFormatLocal to "currency(value)"
Set ComFormatTotalResult to "<r><b> = %l%</b>"
Set ComText to "1000"
Send ComInsertText "2000" Nothing
Send ComInsertLockedText "Commission = Total * 0.05 + (Total ? 2.95 : 0)" Nothing
Send ComInsertLockedText "Total" Nothing
End_Procedure
|
57
|
Is it possible to highlight a specified line

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComAllowVariables to "="
Set ComDrawGridLines to True
Set ComLineHeight to "value + 8 * dpi"
Set ComGridLineColor to (RGB(196,196,196))
Set ComFormatResult to "<r><fgcolor=808080>[=%l%]"
Set ComFormatLocal to "currency(value)"
Set ComFormatTotalResult to "<r><b> = %l%</b>"
Send ComAddWildFormat "<fgcolor=00FF00>*<b>Commission</b>*=*"
Set ComText to "100.50 + 123"
Send ComInsertText "200 + 20/5" Nothing
Send ComInsertText "300 + 3 * 15" Nothing
Send ComInsertText "400 + 200 * (10 + 12/45)" Nothing
Send ComInsertText "50 * 45" Nothing
Send ComInsertText "VAT = Total * 0.19" Nothing
Send ComInsertText "NET = Total - VAT" Nothing
Send ComInsertText "Monthly = Total / 12" Nothing
Send ComInsertText "Commission = Total * 0.05 + 2.95" Nothing
Send ComInsertText "Total" Nothing
End_Procedure
|
56
|
Is it possible to display the result as currency

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComAllowVariables to "="
Set ComDrawGridLines to True
Set ComLineHeight to "value + 8 * dpi"
Set ComGridLineColor to (RGB(196,196,196))
Set ComFormatLocal to "currency(value)"
Set ComFormatTotalResult to "<r><b> = %l%</b>"
Set ComBackColorTotal to (RGB(240,240,240))
Set ComText to "100.50"
Send ComInsertText "200" Nothing
Send ComInsertText "300" Nothing
Send ComInsertText "400" Nothing
Send ComInsertText "VAT = Total * 0.19" Nothing
Send ComInsertText "NET = Total - VAT" Nothing
Send ComInsertText "Total" Nothing
End_Procedure
|
55
|
Is it possible to display the result with no decimals

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComAllowVariables to "="
Set ComDrawGridLines to True
Set ComLineHeight to "value + 8 * dpi"
Set ComGridLineColor to (RGB(196,196,196))
Set ComFormatLocal to "value format `0`"
Set ComFormatTotalResult to "<r><b> = %l%</b>"
Set ComBackColorTotal to (RGB(240,240,240))
Set ComText to "100.50"
Send ComInsertText "200" Nothing
Send ComInsertText "300" Nothing
Send ComInsertText "400" Nothing
Send ComInsertText "VAT = Total * 0.19" Nothing
Send ComInsertText "NET = Total - VAT" Nothing
Send ComInsertText "Total" Nothing
End_Procedure
|
54
|
Is it possible to display the result exactly how it is defined in the control panel

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComAllowVariables to "="
Set ComDrawGridLines to True
Set ComLineHeight to "value + 8 * dpi"
Set ComGridLineColor to (RGB(196,196,196))
Set ComFormatLocal to "value format ``"
Set ComFormatTotalResult to "<r><b> = %l%</b>"
Set ComBackColorTotal to (RGB(240,240,240))
Set ComText to "100.50"
Send ComInsertText "200" Nothing
Send ComInsertText "300" Nothing
Send ComInsertText "400" Nothing
Send ComInsertText "VAT = Total * 0.19" Nothing
Send ComInsertText "NET = Total - VAT" Nothing
Send ComInsertText "Total" Nothing
End_Procedure
|
53
|
How can I count the lines

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComAllowCount to "count"
Set ComAllowSubCount to "subcount"
Set ComDrawGridLines to True
Set ComLineHeight to "value + 8 * dpi"
Set ComGridLineColor to (RGB(196,196,196))
Send ComInsertText "100" Nothing
Send ComInsertText "200" Nothing
Send ComInsertText "SubCount" Nothing
Send ComInsertText "300" Nothing
Send ComInsertText "400" Nothing
Send ComInsertText "500" Nothing
Send ComInsertText "SubCount" Nothing
Send ComInsertText "Count" Nothing
End_Procedure
|
52
|
How can I compute the average
Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComAllowVariables to "="
Set ComDrawGridLines to True
Set ComLineHeight to "value + 8 * dpi"
Set ComGridLineColor to (RGB(196,196,196))
Set ComFormatTotalResult to "<r><b> = %l%</b>"
Set ComBackColorTotal to (RGB(240,240,240))
Set ComText to "Average = Total / Count"
Send ComInsertText "100" Nothing
Send ComInsertText "200" Nothing
Send ComInsertText "300" Nothing
Send ComInsertText "400" Nothing
Send ComInsertText "VAT = Total * 0.19" Nothing
Send ComInsertText "NET = Total - VAT" Nothing
Send ComInsertText "Total" Nothing
End_Procedure
|
51
|
Variables or Computed Fields

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComAllowVariables to "="
Set ComDrawGridLines to True
Set ComLineHeight to "value + 8 * dpi"
Set ComGridLineColor to (RGB(196,196,196))
Set ComFormatTotalResult to "<r><b> = %l%</b>"
Set ComBackColorTotal to (RGB(240,240,240))
Set ComText to "100"
Send ComInsertText "200" Nothing
Send ComInsertText "300" Nothing
Send ComInsertText "400" Nothing
Send ComInsertText "VAT = Total * 0.19" Nothing
Send ComInsertText "NET = Total - VAT" Nothing
Send ComInsertText "Total" Nothing
End_Procedure
|
50
|
I have noticed that definition of the variable is shown in italics. Can I change that

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComAllowVariables to "="
Send ComClearWildFormats
Send ComAddWildFormat "<b>*=*"
Set ComText to "A = 400"
Send ComInsertText "" Nothing
Send ComInsertText "B = A + 0.22" Nothing
Send ComInsertText "A + B" Nothing
Send ComInsertText "B = B * .19" Nothing
Send ComInsertText "A + B" Nothing
End_Procedure
|
49
|
I have noticed that definition of the variable is shown in italics. Can I remove that

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComAllowVariables to "="
Send ComClearWildFormats
Set ComText to "A = 300"
Send ComInsertText "" Nothing
Send ComInsertText "B = A + 0.22" Nothing
Send ComInsertText "A + B" Nothing
Send ComInsertText "B = B * .19" Nothing
Send ComInsertText "A + B" Nothing
End_Procedure
|
48
|
Can I define variables (sample 2)

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComAllowVariables to "is"
Send ComClearWildFormats
Send ComAddWildFormat "<b>*is*"
Set ComText to "A is 200"
Send ComInsertText "" Nothing
Send ComInsertText "B is A + 0.22" Nothing
Send ComInsertText "A + B" Nothing
Send ComInsertText "B is B * .19" Nothing
Send ComInsertText "A + B" Nothing
End_Procedure
|
47
|
Can I define variables (sample 1)

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComAllowVariables to "="
Set ComText to "A = 100.22"
Send ComInsertText "" Nothing
Send ComInsertText "B = A + 0.22" Nothing
Send ComInsertText "A + B" Nothing
Send ComInsertText "B = B * .19" Nothing
Send ComInsertText "A + B" Nothing
End_Procedure
|
46
|
Comments and Prefixes

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComAllowPrefixes to "<fgcolor=808080>:</fgcolor>"
Set ComAllowComments to "<fgcolor=008080>'</fgcolor>"
Set ComText to "Field A: 100 ' this is the field A"
Send ComInsertText "Field B: 200 ' this is the field B" Nothing
Send ComInsertText "Total" Nothing
End_Procedure
|
45
|
Can I display something at the start of each line

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComAllowPrefixes to "<b>:</b>"
Set ComText to "Field A: 100"
Send ComInsertText "Field B: 200" Nothing
Send ComInsertText "Total" Nothing
End_Procedure
|
44
|
I can not use TAB key. Is it possible
Procedure OnCreate
Forward Send OnCreate
Set ComUseTabKey to True
End_Procedure
|
43
|
Does your control support comments

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComCalcType to OLEexCalcIncludeAll
Set ComAllowComments to "<fgcolor=008080>//</fgcolor>"
Set ComText to "104 mod 51 // modulo function"
Send ComInsertText "int(104/51) // int function" Nothing
Send ComInsertText "51 * int(104/51) + (104 mod 51) // check" Nothing
End_Procedure
|
42
|
Can I use the modulo function ( rest )

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComCalcType to OLEexCalcIncludeAll
Set ComText to "104 mod 51"
Send ComInsertText "int(104/51)" Nothing
Send ComInsertText "51 * int(104/51) + (104 mod 51)" Nothing
End_Procedure
|
41
|
Can I use acos function

Procedure OnCreate
Forward Send OnCreate
Set ComCalcType to OLEexCalcIncludeAll
Set ComText to "acos(cos(1))"
End_Procedure
|
40
|
Can I use asin function

Procedure OnCreate
Forward Send OnCreate
Set ComCalcType to OLEexCalcIncludeAll
Set ComText to "asin(sin(1))"
End_Procedure
|
39
|
Can I use cos function

Procedure OnCreate
Forward Send OnCreate
Set ComCalcType to OLEexCalcIncludeAll
Set ComText to "cos(1)"
End_Procedure
|
38
|
Can I use sin function

Procedure OnCreate
Forward Send OnCreate
Set ComCalcType to OLEexCalcIncludeAll
Set ComText to "sin(1)"
End_Procedure
|
37
|
Can I use abs function (absolute part of the number)

Procedure OnCreate
Forward Send OnCreate
Set ComCalcType to OLEexCalcIncludeAll
Set ComText to "abs(-100.99)"
End_Procedure
|
36
|
Can I use round function

Procedure OnCreate
Forward Send OnCreate
Set ComCalcType to OLEexCalcIncludeAll
Set ComText to "round(100.99)"
End_Procedure
|
35
|
Can I use int function (integer part of a number)

Procedure OnCreate
Forward Send OnCreate
Set ComCalcType to OLEexCalcIncludeAll
Set ComText to "int(100.99)"
End_Procedure
|
34
|
Can I use sqrt function (square root of a number)

Procedure OnCreate
Forward Send OnCreate
Set ComCalcType to OLEexCalcIncludeAll
Set ComText to "sqrt(100)"
End_Procedure
|
33
|
How can I show invalid lines with a larger font

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComLineHeight to "value + 8 *dpi"
Set ComDrawGridLines to True
Set ComFormatInvalid to "<u><font ;12> </font></u>"
Send ComInsertText "100" Nothing
Send ComInsertText "k200" Nothing
Send ComInsertText "300" Nothing
End_Procedure
|
32
|
I've noticed that while I type the text is shown in red. How can I change that

Procedure OnCreate
Forward Send OnCreate
Set ComFormatInvalid to ""
Set ComText to "100 * 200"
End_Procedure
|
31
|
Can I enlarge the height of each line

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComLineHeight to "value + 8 * dpi"
Set ComDrawGridLines to True
Send ComInsertText "100" Nothing
Send ComInsertText "200" Nothing
Send ComInsertText "300" Nothing
Send ComInsertText "Total" Nothing
End_Procedure
|
30
|
How can I show grid lines

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComDrawGridLines to True
Set ComGridLineColor to (RGB(0,0,0))
Send ComInsertText "100" Nothing
Send ComInsertText "200" Nothing
Send ComInsertText "300" Nothing
Send ComInsertText "Total" Nothing
End_Procedure
|
29
|
How can I display the result of the total with a larger font

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComDrawGridLines to True
Set ComLineHeight to "value + 8 * dpi"
Set ComFormatTotalResult to "<r><b><font ;14>%l%</font></b>"
Set ComAllowTotal to "<b><font ;14>Total</font></b>"
Send ComInsertText "100" Nothing
Send ComInsertText "200" Nothing
Send ComInsertText "300" Nothing
Send ComInsertText "Total" Nothing
End_Procedure
|
28
|
Is it possible to show the Total / SubTotal with a different background color

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComAllowTotal to "<bgcolor=A0A0A0><b>Total</b></bgcolor>"
Set ComAllowSubTotal to "<bgcolor=E0E0E0><b>SubTotal</b></bgcolor>"
Send ComInsertText "100" Nothing
Send ComInsertText "200" Nothing
Send ComInsertText "SubTotal" Nothing
Send ComInsertText "300" Nothing
Send ComInsertText "400 * 1.5" Nothing
Send ComInsertText "SubTotal" Nothing
Send ComInsertText "Total" Nothing
End_Procedure
|
27
|
Is it possible to show the Total / SubTotal with a different background color

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComBackColorTotal to (RGB(196,196,196))
Set ComBackColorSubTotal to (RGB(240,240,240))
Send ComInsertText "100" Nothing
Send ComInsertText "200" Nothing
Send ComInsertText "SubTotal" Nothing
Send ComInsertText "300" Nothing
Send ComInsertText "400 * 1.5" Nothing
Send ComInsertText "SubTotal" Nothing
Send ComInsertText "Total" Nothing
End_Procedure
|
26
|
How can I change the color to show the numbers

Procedure OnCreate
Forward Send OnCreate
Set ComFormatNumbers to "<fgcolor=FF0000> </fgcolor>"
Set ComText to "1 + 2 + 3 + 4"
End_Procedure
|
25
|
The numbers are shown in blue. How can I remove that

Procedure OnCreate
Forward Send OnCreate
Set ComFormatNumbers to ""
Set ComText to "1 + 2 + 3 + 4"
End_Procedure
|
24
|
How can I export the entire text, including the result

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComText to "100 * 1.5"
Send ComInsertText "120 * 1.5" Nothing
Send ComInsertText "130 * 1.5" Nothing
Send ComInsertText "Total" Nothing
Showln (ComExport(Self))
End_Procedure
|
23
|
Is it possible to display the result, using the current regional locale

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComDrawGridLines to True
Set ComFormatResult to " <fgcolor=808080>[=%l%]</fgcolor>"
Set ComFormatTotalResult to " <b>[=%l%]</b>"
Send ComInsertText "100 * 100" Nothing
Send ComInsertText "200 * 200" Nothing
Send ComInsertText "300 * 300" Nothing
Send ComInsertText "Total" Nothing
End_Procedure
|
22
|
How can I change the format to display the total result (right)

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComDrawGridLines to True
Set ComFormatTotalResult to "<b><fgcolor=FF0000> = %l%</fgcolor></b>"
Set ComAllowTotal to "<b><fgcolor=00FF00>Total</fgcolor></b>"
Send ComInsertText "100" Nothing
Send ComInsertText "200" Nothing
Send ComInsertText "300" Nothing
Send ComInsertText "Total" Nothing
End_Procedure
|
21
|
How can I change the format to display the total result (right)

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComDrawGridLines to True
Set ComLineHeight to "value + 4 * dpi"
Set ComFormatTotalResult to "<r><b><font ;12>%l%</font></b>"
Set ComAllowTotal to "<b><font ;12>Total</font></b>"
Send ComInsertText "100" Nothing
Send ComInsertText "200" Nothing
Send ComInsertText "300" Nothing
Send ComInsertText "Total" Nothing
End_Procedure
|
20
|
Is it possible to rename the SubTotal

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComAllowSubTotal to "<fgcolor=FF0000>Current Amount"
Send ComInsertText "100" Nothing
Send ComInsertText "200" Nothing
Send ComInsertText "Current Amount" Nothing
Send ComInsertText "300" Nothing
Send ComInsertText "400" Nothing
Send ComInsertText "Current Amount" Nothing
Send ComInsertText "Total" Nothing
End_Procedure
|
19
|
How can I disable the sub-totals

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComAllowSubTotal to ""
Send ComInsertText "100" Nothing
Send ComInsertText "200" Nothing
Send ComInsertText "SubTotal" Nothing
Send ComInsertText "300" Nothing
Send ComInsertText "400" Nothing
Send ComInsertText "SubTotal" Nothing
Send ComInsertText "Total" Nothing
End_Procedure
|
18
|
How can I add sub-totals

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComAllowComments to "<fgcolor=008000>'"
Send ComAddWildFormat "<i>*=*<fgcolor=008000>'*"
Set ComAllowVariables to "="
Set ComDrawGridLines to True
Set ComLineHeight to "value + 8 * dpi"
Set ComGridLineColor to (RGB(196,196,196))
Set ComFormatLocal to "currency(value)"
Set ComFormatTotalResult to "<r><b> = %l%</b>"
Set ComFormatSubTotalResult to "<r><fgcolor=808080>[<b> = %l%</b>]"
Set ComFormatResult to "<r><fgcolor=808080>(%l%)"
Set ComBackColorTotal to (RGB(240,240,240))
Set ComBackColorLockedLine to (RGB(0,0,0))
Set ComForeColorLockedLine to (RGB(0,0,0))
Set ComCalcType to OLEexCalcIncludeAll
Set ComText to "100 + 200"
Send ComInsertText "200 * 1.5" Nothing
Send ComInsertText "SubA = SubTotal ' first subtotal" Nothing
Send ComInsertText "300 + (200+300)/2" Nothing
Send ComInsertText "400 + 500" Nothing
Send ComInsertText "SubB = SubTotal ' second subtotal" Nothing
Send ComInsertLockedText "VAT = Total * 0.19" Nothing
Send ComInsertLockedText "Commision = Total * 0.05" Nothing
Send ComInsertLockedText "NET = (Total - VAT) - Commision" Nothing
Send ComInsertLockedText "Total" Nothing
End_Procedure
|
17
|
Is it possible to disable the Total

Procedure OnCreate
Forward Send OnCreate
Set ComAllowTotal to ""
Set ComMultiLine to True
Send ComInsertText "100" Nothing
Send ComInsertText "200" Nothing
Send ComInsertText "300" Nothing
Send ComInsertText "Total" Nothing
End_Procedure
|
16
|
Is it possible to rename the Total to Sum

Procedure OnCreate
Forward Send OnCreate
Set ComAllowTotal to "<fgcolor=FF0000><b>Sum</b></fgcolor>"
Set ComMultiLine to True
Send ComInsertText "100" Nothing
Send ComInsertText "200" Nothing
Send ComInsertText "300" Nothing
Send ComInsertText "Sum" Nothing
End_Procedure
|
15
|
Is it possible to add all lines

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Send ComInsertText "100" Nothing
Send ComInsertText "200" Nothing
Send ComInsertText "300" Nothing
Send ComInsertText "Total" Nothing
End_Procedure
|
14
|
How do I insert / add a new line

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComText to "100 * 1.5"
Send ComInsertText "120 * 2.5\r\n" 1
Send ComInsertText "200 * 1.5" Nothing
End_Procedure
|
13
|
How do I find out if a specified line is valid

// Occurs when the user selects text in the control.
Procedure OnComSelChange
Forward Send OnComSelChange
Showln "CurrentLine: " (ComCaretLine(Self))
Showln "CurrentLine: " (ComTextLine(Self,(ComCaretLine(Self))))
Showln "IsValid: " (ComIsValid(Self,(ComCaretLine(Self))))
End_Procedure
Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComText to "100 * 1.5"
Send ComInsertText "invalid" Nothing
Send ComInsertText "120 * 1.5" Nothing
Send ComInsertText "130 * 1.5" Nothing
End_Procedure
|
12
|
How do I get the current line

// Occurs when the user selects text in the control.
Procedure OnComSelChange
Forward Send OnComSelChange
Showln "CurrentLine: " (ComCaretLine(Self))
Showln "CurrentLine: " (ComTextLine(Self,(ComCaretLine(Self))))
Showln "CurrentResult: " (ComResult(Self,(ComCaretLine(Self))))
End_Procedure
Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComText to "100 * 1.5"
Send ComInsertText "120 * 1.5" Nothing
Send ComInsertText "130 * 1.5" Nothing
End_Procedure
|
11
|
How do I get the line one by one, including the result

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComText to "100 * 1.5"
Send ComInsertText "120 * 1.5" Nothing
Send ComInsertText "130 * 1.5" Nothing
Showln "Lines:" (ComCount(Self))
Showln "TextLine(1):" (ComTextLine(Self,1)) "Result(1)" (ComResult(Self,1))
Showln "TextLine(2):" (ComTextLine(Self,2)) "Result(2)" (ComResult(Self,2))
Showln "TextLine(3):" (ComTextLine(Self,3)) "Result(3)" (ComResult(Self,3))
End_Procedure
|
10
|
Does the control supports multiple lines

Procedure OnCreate
Forward Send OnCreate
Set ComMultiLine to True
Set ComText to "100 * 1.5"
Send ComInsertText "120 * 1.5" Nothing
Send ComInsertText "130 * 1.5" Nothing
End_Procedure
|
9
|
Is it possible to display the result without brakets

Procedure OnCreate
Forward Send OnCreate
Set ComFormatResult to "<fgcolor=808080> = %%</fgcolor>"
Set ComText to "12 + (12 / 100)/2"
End_Procedure
|
8
|
How can I display the result on the right side of the control

Procedure OnCreate
Forward Send OnCreate
Set ComFormatResult to "<r> <fgcolor=808080>[=%%]</fgcolor>"
Set ComText to "12 + (12 / 100)/2"
End_Procedure
|
7
|
Can you please advise how to change fontname and size (sample 2)

Procedure OnCreate
Forward Send OnCreate
Set ComTemplate to "Font.Size = 20; Font.Name = `Tahoma`; Refresh"
Set ComText to "1/2"
End_Procedure
|
6
|
Can you please advise how to change fontname and size (sample 1)

Procedure OnCreate
Forward Send OnCreate
Variant voStdFont
Get ComFont to voStdFont
Handle hoStdFont
Get Create (RefClass(cComStdFont)) to hoStdFont
Set pvComObject of hoStdFont to voStdFont
Set ComSize of hoStdFont to 20
Send Destroy to hoStdFont
Set ComText to "1/2"
Send ComRefresh
End_Procedure
|
5
|
How can I disable evaluating the selection

Procedure OnCreate
Forward Send OnCreate
Set ComEvaluateSel to False
Set ComHideSelection to False
Set ComText to "(1+6.25)/4*6/3"
Set ComSelStart to 1
Set ComSelLength to 6
Set ComSelBackColor to (RGB(0,0,0))
End_Procedure
|
4
|
Can I define a different decimal separator

Procedure OnCreate
Forward Send OnCreate
Set ComAddDecimalSep to ","
Set ComText to "(1+6,25)/4*6/3"
End_Procedure
|
3
|
How do I change the color of the entire control, if the expression is not valid

// Indicates that the control's text has changed.
Procedure OnComChange
Forward Send OnComChange
Showln "Valid:" (ComIsValid(Self,Nothing))
Set ComForeColor to (RGB(255,0,0))
Set ComFormatNumbers to "<fgcolor FF0000>"
Set ComFormatResult to ""
End_Procedure
Procedure OnCreate
Forward Send OnCreate
Set ComFormatInvalid to ""
Set ComText to "invalid(1+6.25)/4*6/3"
End_Procedure
|
2
|
Is there any function to know if the expression is valid

// Indicates that the control's text has changed.
Procedure OnComChange
Forward Send OnComChange
Showln "Valid:" (ComIsValid(Self,Nothing))
Showln "Expression: " (ComText(Self))
Showln "Result: " (ComResult(Self,Nothing))
End_Procedure
Procedure OnCreate
Forward Send OnCreate
Set ComText to "(1+6.25)/4*6/3"
End_Procedure
|
1
|
How do I programatically save / load the expression and the result

Procedure OnCreate
Forward Send OnCreate
Set ComText to "(1+6.25)/4*6/3"
Showln "Expression: " (ComText(Self))
Showln "Result: " (ComResult(Self,Nothing))
End_Procedure
|