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

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

  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.



Log in to post comments.


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

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 15 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: