31:
How can I use my own operators only


oDCOCX_Exontrol1:AllowValueKeyword := false
oDCOCX_Exontrol1:AllowDefaultOperators := false
oDCOCX_Exontrol1:AddCustomOperator("+","<b>+</b>","This is a new binary-operator",2)
oDCOCX_Exontrol1:AddCustomOperator("xxx","<b>xxx</b>","This is a new keyword",0)
oDCOCX_Exontrol1:AddCustomOperator("yyy","<b>yyy</b>","This is a unary-operator",1)
oDCOCX_Exontrol1:AddCustomOperator("zzz","<b>zzz</b>","This is a binary-operator",2)
oDCOCX_Exontrol1:Text := "xxx + yyy(100 zzz 200)"

30:
How can I add a new binary-operator


oDCOCX_Exontrol1:AddCustomOperator("xxx","<b>xxx</b>","This is a new binary-operator",2)
oDCOCX_Exontrol1:Text := "value + 100 xxx 200"

29:
How can I add a new unary-operator


oDCOCX_Exontrol1:AddCustomOperator("xxx","<b>xxx</b>","This is a new unary-operator",1)
oDCOCX_Exontrol1:Text := "value + xxx(100)"

28:
How can I add a new keyword


oDCOCX_Exontrol1:AddCustomOperator("xxx","<b>xxx</b>","This is a new keyword",0)
oDCOCX_Exontrol1:Text := "value + xxx"

27:
How can I disable all operators

oDCOCX_Exontrol1:AllowValueKeyword := false
oDCOCX_Exontrol1:AllowDefaultOperators := false

26:
How can I disable the value keyword

oDCOCX_Exontrol1:AllowValueKeyword := false

25:
Usage of and ( and operator )


oDCOCX_Exontrol1:SplitPaneWidth := 196
oDCOCX_Exontrol1:Expression := "(value contains 1) and (value != 1)"

24:
Usage of or ( or operator )


oDCOCX_Exontrol1:SplitPaneWidth := 196
oDCOCX_Exontrol1:Expression := "(value=1) or value=`string`"

23:
Usage of not ( not operator )


oDCOCX_Exontrol1:SplitPaneWidth := 196
oDCOCX_Exontrol1:Expression := "not(value=1)"

22:
Usage of - ( subtraction operator )


oDCOCX_Exontrol1:SplitPaneWidth := 196
oDCOCX_Exontrol1:Expression := "value - 2"

21:
Usage of + ( addition operator )


oDCOCX_Exontrol1:SplitPaneWidth := 196
oDCOCX_Exontrol1:Expression := "value + 2"

20:
Usage of mod ( reminder operator )


oDCOCX_Exontrol1:SplitPaneWidth := 196
oDCOCX_Exontrol1:Expression := "value mod 2"

19:
Usage of / (divide operator)


oDCOCX_Exontrol1:SplitPaneWidth := 196
oDCOCX_Exontrol1:Expression := "value / 2"

18:
Usage of * (multiplicity operator)


oDCOCX_Exontrol1:SplitPaneWidth := 196
oDCOCX_Exontrol1:Expression := "2 * value"

17:
How can I get the word from cursor when user double clicks the control
METHOD OCX_Exontrol1DblClick(Shift,X,Y) CLASS MainDialog
	// DblClick event - Occurs when the user double clicks the left mouse button over an object.
	OutputDebugString(String2Psz( "Word: " ))
	OutputDebugString(String2Psz( oDCOCX_Exontrol1:[WordFromPoint,-1,-1,nil] ))
RETURN NIL


oDCOCX_Exontrol1:Expression := "value"
oDCOCX_Exontrol1:AllowSplitter := exVSplitter
oDCOCX_Exontrol1:SplitPaneHeight := 196

16:
How do I determine the word from the cursor
METHOD OCX_Exontrol1Click() CLASS MainDialog
	// Click event - Occurs when the user presses and then releases the left mouse button over the list control.
	OutputDebugString(String2Psz( "Word: " ))
	OutputDebugString(String2Psz( oDCOCX_Exontrol1:[WordFromPoint,-1,-1,nil] ))
RETURN NIL


oDCOCX_Exontrol1:Expression := "value"
oDCOCX_Exontrol1:SplitPaneHeight := 196
oDCOCX_Exontrol1:[Background,exVSplitterApp] := RGB(240,240,240)
oDCOCX_Exontrol1:AllowSplitter := exVSplitter

15:
How can I check if the expression is valid/syntactically correct
METHOD OCX_Exontrol1Change() CLASS MainDialog
	// Change event - Indicates that the control's text has changed.
	OutputDebugString(String2Psz( "Valid: " ))
	OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:IsValid) ))
RETURN NIL


oDCOCX_Exontrol1:Expression := "value"
oDCOCX_Exontrol1:SplitPaneHeight := 196
oDCOCX_Exontrol1:[Background,exVSplitterApp] := RGB(240,240,240)
oDCOCX_Exontrol1:AllowSplitter := exVSplitter

14:
How can I change the visual appearance of the horizontal splitter


oDCOCX_Exontrol1:Expression := "value"
oDCOCX_Exontrol1:SplitPaneHeight := 196
oDCOCX_Exontrol1:[Background,exVSplitterApp] := RGB(240,240,240)
oDCOCX_Exontrol1:AllowSplitter := exVSplitter

13:
How can I change the visual appearance of the vertical splitter


oDCOCX_Exontrol1:Expression := "value"
oDCOCX_Exontrol1:SplitPaneWidth := 196
oDCOCX_Exontrol1:[Background,exHSplitterApp] := RGB(240,240,240)

12:
How can I add a new menu-item to control's context menu
METHOD OCX_Exontrol1ExecuteContextMenu(Item,Position) CLASS MainDialog
	// ExecuteContextMenu event - Occurs when the user selects an user item from the control's context menu.
	OutputDebugString(String2Psz( "ExecuteContextMenu: " ))
	OutputDebugString(String2Psz( AsString(Item) ))
RETURN NIL


oDCOCX_Exontrol1:Expression := "value + 100"
oDCOCX_Exontrol1:ContextMenuItems := "Test"

11:
How can I change the tooltip that shows when cursor hovers a keyword


oDCOCX_Exontrol1:Expression := "value"
oDCOCX_Exontrol1:[Description,exKeywordValue] := "This is a bit of text to be shown when cursor hovers the <b>value</b> keyword."
oDCOCX_Exontrol1:Refresh()

10:
How do I check if the expression is correct

oDCOCX_Exontrol1:Expression := "currency(value)"
OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:IsValid) ))

9:
How do I programmatically evaluate the expression

oDCOCX_Exontrol1:Expression := "currency(value)"
OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:[Evaluate,"value=100"]) ))

8:
How can I assign multiple values for variables %1, %2, ...


oDCOCX_Exontrol1:SplitPaneWidth := 196
oDCOCX_Exontrol1:Expression := "currency(%1 + %2)"
oDCOCX_Exontrol1:EvaluationText := "%1 = 100;%2 = 200"

7:
How can I change the values to show the result

oDCOCX_Exontrol1:SplitPaneWidth := 196
oDCOCX_Exontrol1:Expression := "currency(value)"
oDCOCX_Exontrol1:EvaluationText := "value = 100"

6:
How can I prevent changing the color when expression is invalid

oDCOCX_Exontrol1:SplitPaneWidth := 196
oDCOCX_Exontrol1:Expression := "value 2"
oDCOCX_Exontrol1:ForeColorInvalid := RGB(0,0,0)

5:
How can I change the color when expression is invalid

oDCOCX_Exontrol1:SplitPaneWidth := 196
oDCOCX_Exontrol1:Expression := "value 2"
oDCOCX_Exontrol1:ForeColorInvalid := RGB(255,0,0)

4:
How can I prevent evaluation the selection


oDCOCX_Exontrol1:SplitPaneWidth := 196
oDCOCX_Exontrol1:Expression := "value + 1"
oDCOCX_Exontrol1:EvaluateSelection := false
oDCOCX_Exontrol1:HideSelection := false
oDCOCX_Exontrol1:SelLength := 1

3:
How can I programatically show the result

oDCOCX_Exontrol1:SplitPaneWidth := 196
oDCOCX_Exontrol1:Expression := "value"

2:
How can I get ride of the right-vertical line/split

oDCOCX_Exontrol1:AllowSplitter := exNoSplitter
oDCOCX_Exontrol1:Expression := "value + 1"

1:
How can I change the control's background

oDCOCX_Exontrol1:Expression := "value"
oDCOCX_Exontrol1:BackColor := RGB(240,240,240)