constants PropertyLayerCaptionEnum
The PropertyLayerCaptionEnum type holds properties of the HTML caption that can be displayed on the control. Any of the following properties can be used to display a HTML caption:

The PropertyLayerCaptionEnum type supports the following value:

NameValueDescription
exLayerCaption0 Indicates the HTML caption to be displayed on the caption. By default, the exLayerCaption is empty. You can use the exLayerCaptionWordWrap to display the caption on multiple lines. The exLayerCaption supports built-in HTML format as listed here.

(string expression)

exLayerCaptionBackColor1 Indicates the caption's background color. By default, the exLayerCaptionBackColor property is -1, which indicates that no background color is applied. The last 7 bits in the high significant byte of the color indicates the identifier of the skin being used. You can use the <bgcolor> HTML tag in the exLayerCaption to specify a different background color for a portion of the text. Use the Add method to add new skins to the control. If you need to remove the skin appearance from a part of the control you need to reset the last 7 bits in the high significant byte of the color being applied to the background's part.

(long expression)

exLayerCaptionForeColor2 Indicates the caption's foreground color. By default, the exLayerCaptionForeColor property is -1, which indicates that no foreground color is applied.  You can use the <fgcolor> HTML tag in the exLayerCaption to specify a different foreground color for a portion of the text.

(long expression)

exLayerCaptionAnchor3 Specifies the side of the host where the caption is anchored. By default, the exLayerCaptionAnchor property is 1 (exAnchorTop), that indicates that the caption is anchored to the top side of its host. You can use the exLayerCaptionLeft, exLayerCaptionTop, exLayerCaptionWidth and exLayerCaptionHeight to display the caption at a different position relative to its original position.

(AnchorEnum type).

exLayerCaptionLeft4 Specifies the expression to determine the x-position to show the caption, relative to its current position. By default, the exLayerCaptionLeft property is "0", which indicates that the caption is displayed at it's original position (horizontal axis), determined by the exLayerCaptionAnchor. You can use the exLayerCaptionAnchor property to anchor the caption to a different side of the host.

The property supports the following keywords:

  • twidth, indicates the width required to fully display the caption
  • theight, indicates the height required to fully display the caption
  • width, indicates the width of the control ( if it is applied to the control's foreground Caption or ExtraCaption  )
  • height, indicates the height control ( if it is applied to the control's foreground Caption or ExtraCaption  ) 

The property supports predefined constants, operators and functions as described here .

(string expression)

exLayerCaptionTop5 Specifies the expression to determine the y-position to show the caption, relative to its current position. By default, the exLayerCaptionTop property is "0", which indicates that the caption is displayed at it's original position (vertical axis), determined by the exLayerCaptionAnchor. You can use the exLayerCaptionAnchor property to anchor the caption to a different side of the host.

The property supports the following keywords:

  • twidth, indicates the width required to fully display the caption
  • theight, indicates the height required to fully display the caption
  • width, indicates the width of the control ( if it is applied to the control's foreground Caption or ExtraCaption  )
  • height, indicates the height control ( if it is applied to the control's foreground Caption or ExtraCaption  ) 

The property supports predefined constants, operators and functions as described here .

(string expression)

exLayerCaptionWidth6 Specifies the expression to determine the width to show the caption, relative to its current width. By default, the exLayerCaptionWidth property is "twidth", which indicates that the caption is displayed on its full width.  You can use the exLayerCaptionAnchor property to anchor the caption to a different side of the host.

The property supports the following keywords:

  • twidth, indicates the width required to fully display the caption
  • theight, indicates the height required to fully display the caption
  • width, indicates the width of the control ( if it is applied to the control's foreground Caption or ExtraCaption  )
  • height, indicates the height control ( if it is applied to the control's foreground Caption or ExtraCaption  ) 

The property supports predefined constants, operators and functions as described here .

(string expression)

exLayerCaptionHeight7 Specifies the expression to determine the height to show the caption, relative to its current height. By default, the exLayerCaptionHeight property is "theight", which indicates that the caption is displayed on its full height.  You can use the exLayerCaptionAnchor property to anchor the caption to a different side of the host.

The property supports the following keywords:

  • twidth, indicates the width required to fully display the caption
  • theight, indicates the height required to fully display the caption
  • width, indicates the width of the control ( if it is applied to the control's foreground Caption or ExtraCaption  )
  • height, indicates the height control ( if it is applied to the control's foreground Caption or ExtraCaption  ) 

The property supports predefined constants, operators and functions as described here .

(string expression)

exLayerCaptionWordWrap8 Indicates whether a multiline caption automatically wraps words to the beginning of the next line when necessary. By default, the exLayerCaptionWordWrap property is False.

(boolean expression)

exLayerCaptionBackgroundExt9 Indicates Unlimited options to show any HTML text, images, colors, EBNs, patterns, frames anywhere on the layer's background, using EBN String Format. A short description of the EBN String Format is described here, or a full description of the EBN String Format can be found here.

(string expression)

exLayerCaptionVisibleFront10 Specifies whether the caption is shown in front. By default, the exLayerCaptionVisibleFront property is True, which indicates that the caption is shown in front. Use the exLayerCaptionVisibleFront property to display the caption on the layer's background, if the exLayerCaptionVisibleFront property is False.

(boolean expression)

The exLayerCaption supports built-in HTML tags as follow:

The property supports predefined constants, operators and functions as listed bellow:

The constants are ( DPI-Aware components ):

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 binary range operators, all these with the same priority 5, are :

The supported binary 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:

Other known operators for numbers are:

Other known operators for strings are:

Other known operators for dates are:

The Exontrol's eXPression component is a syntax-editor that helps you to define, view, edit and evaluate expressions. Using the eXPression component you can easily view or check if the expression you have used is syntactically correct, and you can evaluate what is the result you get giving different values to be tested. The Exontrol's eXPression component can be used as an user-editor, to configure your applications.

The EBN String Format syntax in BNF notation is defined like follows:

<EBN> ::= <elements> | <root> "(" [<elements>] ")"
<elements> ::= <element> [ "," <elements> ]
<root> ::= "root" [ <attributes> ] | [ <attributes> ]
<element> ::= <anchor> [ <attributes> ] [ "(" [<elements>] ")" ]
<anchor> ::= "none" | "left" | "right" | "client" | "top" | "bottom"
<attributes> ::= "[" [<client> ","] <attribute> [ "," <attributes> ] "]"
<client> ::= <expression> | <expression> "," <expression> "," <expression> "," <expression>
<expression> ::= <number> | <number> "%"
<attribute> ::= <backcolor> | <text> | <wordwrap> | <align> | <pattern> | <patterncolor> | <frame> | <framethick> | <data> | <others>
<equal> ::= "="
<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
<decimal> ::= <digit><decimal>
<hexadigit> ::= <digit> | "A" | "B"  "C" | "D" | "E"  "F"
<hexa> ::= <hexadigit><hexa>
<number> ::= <decimal> | "0x" <hexa>
<color> ::= <rgbcolor> | number
<rgbcolor> ::= "RGB" "(" <number> "," <number> "," <number> ")"
<string> ::= "`" <characters> "`" | "'" <characters> "'" | " <characters> "
<characters> ::= <char>|<characters>
<char> ::= <any_character_excepts_null>
<backcolor> ::= "back" <equal> <color>
<text> ::= "text" <equal> <string>
<align> ::= "align" <equal> <number>
<pattern> ::= "pattern" <equal> <number>
<patterncolor> ::= "patterncolor" <equal> <color>
<frame> ::= "frame" <equal> <color>
<data> ::= "data" <equal> <number> | <string>
<framethick> ::= "framethick"
<wordwrap> ::= "wordwrap"

Others like: pic, stretch, hstretch, vstretch, transparent, from, to are reserved for future use only.

Easy samples:

Now, lets say we have the following request to layout the colors on the objects:

We define the BackgroundExt property such as "top[30%,back=RGB(253,218,101)],client[back=RGB(91,157,210)],none[(0%,0%,10%,100%)](top[90%,back=RGB(0,0,0)])", and it looks as:

so, if we apply to our object we got:

Now, lets say we have the following request to layout the colors on the objects:

We define BackgroundExt property such as "left[10%](top[90%,back=RGB(0,0,0)]),top[30%,back=RGB(254,217,102)],client[back=RGB(91,156,212)]", and it looks as:

so, if we apply to our object we got: