/* $DOC$ $NAME$ ft_ClrSel() $CATEGORY$ Menus/Prompts $ONELINER$ User Selectable Color Routine $SYNTAX$ ft_ClrSel( , [ ], [ ] -> aClrData $ARGUMENTS$ is an array of subarrays, with each subarray containing information about the color settings. The subarray has the following structure: [ 1 ] cName is the name of this color setting i.e. "Pick List" Maximum length is 20 bytes [ 2 ] cClrStr is the current color string Default is "W/N,N/W,N/N,N/N,N/W" If Setting type is "M" (Menu) the colors are... 1. Prompt Color 2. Message Color 3. HotKey Color 4. LightBar Color 5. LightBar HotKey Color Note: While there are many ways to code the individual color combinations, they should be in the same format that gets returned from SetColor(), so the defaults can be found in the color palette. foreground [+] / background [*] i.e. "GR+/BG*, N/W*, N+/N, , W/N" [ 3 ] cType is the type of color setting Default is "W" (Window) T = Title Only 1 color element D = Desktop Background color and character M = Menu For ft_MenuTo() style menus W = Window Windows with radio buttons G = Get For use with @ SAY... B = Browse For TBrowse() and *dbEdit() A = aChoice Pick-lists etc... W/G/B/A are functionally the same but will provide a more appropriate test display. [ 4 ] cFillChar is the character (for desktop background only) Default is "▒▒▒▒▒▒▒▒▒▒▒▒▒▒" .T. use color palette .F. use monochrome palette Default is the IsColor() setting 2 Byte character string for color test display Default is "■■" $RETURNS$ An array identical to the one passed, with new selected colors $DESCRIPTION$ This function allows users to select their own color combinations for all the different types of screen I/O in a typical application. This facilitates an easy implementation of Ted Means' replacement of the @..PROMPT/MENU TO found in the NanForum Toolkit. If you are not using ft_MenuTo(), you can specify "A" for setting type and have a normal color string returned. $EXAMPLES$ LOCAL aClrs LOCAL lColor := IsColor() Set( _SET_SCOREBOARD, .F. ) SetBlink( .F. ) // Allow bright backgrounds // .... a typical application might have the following different settings // normally these would be stored in a .dbf/.dbv aClrs := { ; { "Desktop", "N/BG", "D", "▒" }, ; { "Title", "N/W", "T" }, ; { "Top Menu", "N/BG,N/W,W+/BG,W+/N,GR+/N", "M" }, ; { "Sub Menu", "W+/N*,GR+/N*,GR+/N*,W+/R,G+/R", "M" }, ; { "Standard Gets", "W/B, W+/N,,, W/N", "G" }, ; { "Nested Gets", "N/BG, W+/N,,, W/N", "G" }, ; { "Help", "N/G, W+/N,,, W/N", "W" }, ; { "Error Messages", "W+/R*,N/GR*,,,N/R*", "W" }, ; { "Database Query", "N/BG, N/GR*,,,N+/BG", "B" }, ; { "Pick List", "N/GR*,W+/B,,, BG/GR*", "A" } } aClrs := ft_ClrSel( aClrs, lColor ) $END$ */