Type | Description | |||
String | A string expression that indicates the items to be shown on the edit's context menu. |
The edit's context menu is displayed if the user right clicks while editing the event. Use the EditContextMenuItems property to change the edit's context menu.
By default the EditContextMenuItems property is:
Command[id=57625][captionwidth=48][group=19](Undo[id=57643][align=1][button=-1][captionwidth=44],Redo[id=57644][align=1][button=-1]),Edit[id=57624][captionwidth=48][group=19](Cut[id=57635][align=1][button=-1],Copy[id=57634][align=1][button=-1],Paste[id=57637][align=1][button=-1],Delete[id=57632][align=1][button=-1],Select All[id=57642][align=1][button=-1]),format[sep][id=57623][height=13],Type[id=57622][show=1][captionwidth=28][group=19](B[id=57648][typ=1][align=1][show=1],I[id=57649][typ=1][align=1][show=1],U[id=57650][typ=1][align=1][show=1],S[id=57651][typ=1][align=1][show=1],[sep][id=57621],A[id=57760][typ=1][align=1][spchk=-1][show=1](ID[id=57761][edittype=1][editwidth=-172],Options[id=57762][edittype=1][editwidth=-72]),G [id=57715][typ=1][align=1][spchk=-1][show=1](Color[id=57717][edittype=518][border=0][editwidth=-72],Mode[id=57724][group=17](H[id=57725][typ=2][align=1][chk=1][show=1][grp=2],V[id=57726][typ=2][align=1][show=1][grp=2],FD[id=57727][typ=2][align=1][show=1][grp=2],BD[id=57728][typ=2][align=1][show=1][grp=2]),Blend Triangular Shape[id=57729][typ=1][show=-1]),[id=57730][typ=1][align=1][spchk=-1][show=1](Color[id=57732][edittype=518][border=0][editwidth=-96],Width[id=57739][edittype=3][border=0][min=1][max=4][freq=1][editwidth=-72]), O S [id=57743][typ=1][align=1][spchk=-1][show=1](Color[id=57745][edittype=518][border=0][editwidth=-72],Offset[id=57752][edittype=3][border=0][min=-8][max=+8][freq=1][editwidth=-128],Width[id=57756][edittype=3][border=0][min=2][max=+7][freq=1][editwidth=-128])),[sep][id=57620][height=4],Align[id=57619][show=1][captionwidth=24][height=26][group=19]([id=57618][group=19](Offset[id=57709][typ=1][chk][show=1][showdis][border=0][min=-32][max=+32][freq=4][editwidth=-96][height=24])),Color[id=57618][captionwidth=28][height=26][group=3](Fore[id=57685][typ=1][show=1][showdis][editwidth=-96][height=24],[sep][id=57617],Back[id=57686][typ=1][show=1][showdis][editwidth=-96][height=24]),Font[id=57617][captionwidth=28][height=26][group=3](Face[id=57701][typ=1][show=1][showdis][height=24][editwidth=-116],[sep][id=57616],Size[id=57702][typ=1][show=1][showdis][height=24][editwidth=-82][min=4][max=72][freq=4]),Misc[id=57609][captionwidth=24][group=3](Image[id=57608](Size[id=57680][edittype=515][border=0][min=16][max=128][freq=16][editwidth=-128][ticklabel=value = %i ? ''+value : ( value = vmax ? ''+value : ( value = vmin ? ' '+value : '' ) )],Insert[id=57679]()))
By default, the control's context menu shows as following:
Let's say we want to remove all that grouping, and shows as a regular context menu ( just remove all the [group] from the EditContextMenuItems property, and you should get something like:
The EditContextMenuItems's syntax in BNF notation:
<EditContextMenuItems> ::= <ITEMS>
<ITEMS> ::= <ITEM>["("<ITEMS>")"][","<ITEMS>]
<ITEM> ::= <CAPTION>[<OPTIONS>]
<OPTIONS> ::= "["<OPTION>"]"["["<OPTIONS>"]"]
<OPTION> ::= <PROPERTY>["="<VALUE>]
<PROPERTY> ::= "img" | "himg" | "sep" | "id" |
"typ" | "group" | "chk" | "button" | "align" |
"spchk" | "show" | "rad" | "dis" | "showdis" |
"bld" | "itl" | "stk" | "und" | "bg" |
"fg" | "edittype" | "edit" | "mask" | "border" |
"editwidth" | "captionwidth" | "height" |
"grp" | "tfi" | "ttp" | "min" | "max" | "tick" | "freq" |
"ticklabel" | "small" | "large"
| "spin" | "ettp" | "float"
where the <CAPTION> is the HTML caption to be shown on the context menu item. The <VALUE> indicates the value of giving property.
!(999) 000 0000;1;;select=1,empty,overtype,warning=invalid character,invalid=The value you entered isn't appropriate for the input mask <b>'<%mask%>'</b> specified for this field."
indicates the following:
The four parts of an input mask, or the Mask property supports up to four parts, separated by a semicolon (;). For instance, "`Time: `00:00:00;;0;overtype,warning=<fgcolor FF0000>invalid character,beep", indicates the pattern "00:00" with the prefix Time:, the masking character being the 0, instead _, the field enters in over-type mode, insert-type mode is not allowed, and the field beeps and displays a tooltip in red with the message invalid character when the user enters an invalid character.
Input masks are made up one mandatory part and three optional parts, and each part is separated by a semicolon (;). If a part should use the semicolon (;) it must uses the \; instead
The purpose of each part is as follows:
The following table lists the placeholder and literal characters for an input mask and explains how it controls data entry:
Characters enclosed in double quotation ("" or ``) marks will be displayed literally. If this part should display/use the semicolon (;) character is should be included between double quotation ("" or ``) characters or as \; ( escape ).
The known options for the forth part are:
float, indicates that the field is edited as a decimal number, integer. The first part of the input mask specifies the pattern to be used for grouping and decimal separators, and - if negative numbers are supported. If the first part is empty, the float is formatted as indicated by current regional settings. For instance, "##;;;float" specifies a 2 digit number in float format. The grouping, decimal, negative and digits options are valid if the float option is present.
Experimental:
multiline, specifies that the field supports multiple lines.
rich, specifies that the field displays a rich type editor. By
default, the standard edit field is shown
disabled, shows as disabled the field.
If the <VALUE> property is empty, the control takes the settings for the regional options like: Decimal Symbol , No. of digits after decimal, Digit grouping symbol.
Here are few samples:
The <VALUE>"-###.###.##0,00" filter floating point numbers a number for German settings ( "," is the decimal sign, "." is the thousands separator ). This format displays leading-zeros.
The <VALUE>"-###.###.###,##" filter floating point numbers a number for German settings ( "," is the decimal sign, "." is the thousands separator )
The <VALUE>"-###,###,###.##" filter floating point numbers a number for English settings ( "." is the decimal sign, "," is the thousands separator )
The <VALUE>"####" indicates a max-4 digit number ( positive ) without a decimal symbol and without digit grouping
The <VALUE>"-##.#" filters a floating point number from the -99.9 to 99.9 ( "." is the decimal sign, no thousands separator )
The <VALUE>"#,###.##" filters a floating point number from the 0 to 9,999.99 with digit grouping ( "." is the decimal sign, "," is the thousands separator ).
ContextMenu - Tick Label Expression
For instance:
The The <VALUE> of [ticklabel] option is a formatted expression which result may include the HTML tags.
The The <VALUE> of [ticklabel] option indicates a formatting expression that may use the following predefined keywords:
The supported binary arithmetic operators are:
The supported unary boolean operators are:
The supported binary boolean operators are:
The supported binary boolean operators, all these with the same priority 0, are :
The supported ternary operators, all these with the same priority 0, are :
"expression ? true_part : false_part"
, while it executes and returns the true_part if the expression is true, else it executes and returns the false_part. For instance, the "%0 = 1 ? 'One' : (%0 = 2 ? 'Two' : 'not found')" returns 'One' if the value is 1, 'Two' if the value is 2, and 'not found' for any other value. A n-ary equivalent operation is the case() statement, which is available in newer versions of the component.
The supported n-ary operators are (with priority 5):
"expression array (c1,c2,c3,...cn)"
, where the c1, c2, ... are constant elements. The constant elements could be numeric, date or string expressions. For instance the "month(value)-1 array ('J','F','M','A','M','Jun','J','A','S','O','N','D')" is equivalent with "month(value)-1 case (default:''; 0:'J';1:'F';2:'M';3:'A';4:'M';5:'Jun';6:'J';7:'A';8:'S';9:'O';10:'N';11:'D')".
"expression in (c1,c2,c3,...cn)"
, where the c1, c2, ... are constant elements. The constant elements could be numeric, date or string expressions. For instance the "value in (11,22,33,44,13)" is equivalent with "(expression = 11) or (expression = 22) or (expression = 33) or (expression = 44) or (expression = 13)". The in operator is not a time consuming as the equivalent or version is, so when you have large number of constant elements it is recommended using the in operator. Shortly, if the collection of elements has 1000 elements the in operator could take up to 8 operations in order to find if an element fits the set, else if the or statement is used, it could take up to 1000 operations to check, so by far, the in operator could save time on finding elements within a collection.
"expression switch (default,c1,c2,c3,...,cn)"
, where the c1, c2, ... are constant elements, and the default is a constant element being returned when the element is not found in the collection. The constant elements could be numeric, date or string expressions. The equivalent syntax is "%0 = c 1 ? c 1 : ( %0 = c 2 ? c 2 : ( ... ? . : default) )". The switch operator is very similar with the in operator excepts that the first element in the switch is always returned by the statement if the element is not found, while the returned value is the value itself instead -1. For instance, the "%0 switch ('not found',1,4,7,9,11)" gets 1, 4, 7, 9 or 11, or 'not found' for any other value. As the in operator the switch operator uses binary searches for fitting the element, so it is quicker that iif (immediate if operator) alterative.
"expression case ([default : default_expression ; ] c1 : expression1 ; c2 : expression2 ; c3 : expression3 ;....)"
If the default part is missing, the case() operator returns the value of the expression if it is not found in the collection of cases ( c1, c2, ...). For instance, if the value of expression is not any of c1, c2, .... the default_expression is executed and returned. If the value of the expression is c1, then the case() operator executes and returns the expression1. The default, c1, c2, c3, ... must be constant elements as numbers, dates or strings. For instance, the "date(shortdate(value)) case (default:0 ; #1/1/2002#:1 ; #2/1/2002#:1; #4/1/2002#:1; #5/1/2002#:1)" indicates that only #1/1/2002#, #2/1/2002#, #4/1/2002# and #5/1/2002# dates returns 1, since the others returns 0. For instance the following sample specifies the hour being non-working for specified dates: "date(shortdate(value)) case(default:0;#4/1/2009# : hour(value) >= 6 and hour(value) <= 12 ; #4/5/2009# : hour(value) >= 7 and hour(value) <= 10 or hour(value) in(15,16,18,22); #5/1/2009# : hour(value) <= 8)" statement indicates the working hours for dates as follows:
- #4/1/2009#, from hours 06:00 AM to 12:00 PM
- #4/5/2009#, from hours 07:00 AM to 10:00 AM and hours 03:00PM, 04:00PM, 06:00PM and 10:00PM
- #5/1/2009#, from hours 12:00 AM to 08:00 AM
The in, switch and case() use binary search to look for elements so they are faster then using iif and or expressions.
Obviously, the priority of the operations inside the expression is determined by ( ) parenthesis and the priority for each operator.
The supported conversion unary operators are:
Here's few predefined types:
Other known operators for numbers are:
The ' flags' for format operator is a list of values separated by | character such as 'NumDigits|DecimalSep|Grouping|ThousandSep|NegativeOrder|LeadingZero' with the following meanings:
Other known operators for strings are:
Other known operators for dates are:
The The <VALUE> of [ticklabel] option can display labels using the following built-in HTML tags: