Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Expression_function



Panel
titleDescription

This function is used specifically when binding a Border property on a component. Typically, this is used with a Container or Label component but can be used on any component that has a Border property.

This function takes a string and converts it into a border. The string must be a semi-colon separated list of values. The first value is the name of the border, and the other values depend on the type of border you use. The following table defines the border types and the arguments they accept.

 

Border Type

Options

Type

Style

Font Justification

bevel

bevelType

0 = Raised

1 = Lowered

1010 = Double

  

button

none

   

etched

etchType

0 = Raised

1 = Lowered

  

etchedtitled

titlestylefontJustificationfontPositionfontColorfont

 

0 = Etched / Lowered

1 = Etched / Raised

2 = Beveled / Lowered

3 = Beveled / Raised

4 = Beveled / Double

5 = Standard

1 = Left

2 = Center

3 = Right

4 = Leading

5 = Trailing

field

none

   

line

colorthickness

   

linetitled

titlewidthlineColorfontJustificationfontPositionfontColorfont

  

1 = Left

2 = Center

3 = Right

4 = Leading

5 = Trailing

matte

colortopWidthleftWidthbottomWidthrightWidth

   

paneltitled

titlestylemainColor; bgColor, shadowSize, fontJustificationfontPositionfontColor;font

 

 

1=Gradient / West-to-East

2=Gradient / North-to-South

3=Gradient / East-to-West

4=Solid

1 = Left

2 = Center

3 = Right

4 = Leading

5 = Trailing

 

To use this function, you need to include the border type and then any options you want to use in the correct order. ie:

Code Block
languagepy
toBorder("paneltitled; title; style; mainColor; bgColor, shadowSize, fontJustification; fontPosition; fontColor;font")



Panel
titleSyntax

toBorder(value[, failover])

  • Parameters

string value - The value to type cast.

object failover - Optional. The failover value if type casting fails.

  • Results

Border - The value type cast as a border object.


Panel
titleExamples


Code Block
languageactionscript3
titleCode Snippet
toBorder("bevel;1010")  //returns this...

Code Block
languageactionscript3
titleCode Snippet
toBorder("button")

Code Block
languageactionscript3
titleCode Snippet
toBorder("etched;0")

Code Block
languageactionscript3
titleCode Snippet
toBorder("etchedtitled;Title;5;3;right;green;Arial")

Code Block
languageactionscript3
titleCode Snippet
toBorder("field")

Code Block
languageactionscript3
titleCode Snippet
toBorder("line;blue;2")

Code Block
languageactionscript3
titleCode Snippet
toBorder("linetitled;Title") //returns this...

Code Block
languageactionscript3
titleCode Snippet
toBorder("matte;red;10;1;1;1") //returns this...

Code Block
languageactionscript3
titleCode Snippet
toBorder("paneltitled;Options;1;grey;white;0;3;0;green;Dialog,bold,16") //returns this...