Brian Dunning's FileMaker Custom Functions

cfColorByIndent ( pText ; pIndentChar ; pRgbColorList )

emphasizing thread-depths in a forum or indentations in text

  Average rating: 4.2 (39 votes) Log in to vote

Tammo Fornalik / Felix Hausberner   Tammo Fornalik / Felix Hausberner
dbyte solutions
http://www.dbyte-solutions.com

Share on Facebook Share on Twitter

  Sample input:
cfColorByIndent( ">Hello!¶>>What's up?¶¶>>>Look: 5>4¶Ah."; ">"; RGB( 0; 0; 255 ) &¶& RGB( 0; 255; 0 ) &¶& RGB( 255; 0; 0 ) )
  Sample output:
[BLUE] >Hello
[GREEN] >>What's up?
[RED] >>>Look: 5>4
[FIELD COLOR] Ah.

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

great for emphasizing thread-depths in a forum or indentations in text. arbitrary color-lists.
colors every line by counting the determined indention character, which is always at the start of a line (also several times).
thereby it does not matter how often the character occurs in the line altogether, but only, how often the character occurs BEFORE
the first "regular" character of the line.
the highest indentation-level (no indention) is left in the standard text color for the appropriate field.
as soon as the indentation count exceeds the count of determined colors, the color list rotates.
also permitted is a multiline-rgb-list list of a global field.

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.