J Posted October 31, 2005 Posted October 31, 2005 I am trying to set the color of a container field or the fill/background color of an edit box based on the rgb numbers. Fields RGB - text field contains rgb number (84:00:17) should I split this into 3 fields Color - storage or text field. I need to set the fill or background color of Color field with the rgb info from RGB field. Thanks
aaa Posted October 31, 2005 Posted October 31, 2005 (edited) Hi, J! Anything like this as in attachment? Fill.zip Edited October 31, 2005 by Guest
Raybaudi Posted October 31, 2005 Posted October 31, 2005 Hi aaa your calc for Fill_calc isn' corret when someone enter only one or two digit for a color ! This is better: TextColor ( SYMB ; Evaluate ( "RGB" & Substitute ( LeftValues (RGB_Text; 1 ); ":" ; ";" ) ) ) BTW here it's my attachment Fill2.zip
aaa Posted October 31, 2005 Posted October 31, 2005 Yes, raybaudi! It is better. I was think about this after posting. But because the main goal was how create filling i did not change post. But your note is very important and usable. Thank you.
J Posted October 31, 2005 Author Posted October 31, 2005 What is the Symb field for? What data are you sticking in there?
sbg2 Posted October 31, 2005 Posted October 31, 2005 The SYMB field is a text field that holds the Arial character "Full Block" (Unicode 2588)which is the following character: █ It is what the name implies, a full block. Since Filemaker has yet to offer the abilty to change a fields background color you must create a container field that holds text like such: ███████████ By placing a number of these characters in a container field you can change the color of the text. It takes some trial and error to get everything sized right but does work. You can see a list of the characters available for each font by using Start>Programs>Accessories>System Tools>Character Map
J Posted October 31, 2005 Author Posted October 31, 2005 Thank you for your help. One more question. If the rgb field is blank, I want it show white (or no color). How can I do that? Here is the calc as I have. I changed the field that contains the rgb numbers. TextColor ( SYMB ; Evaluate ( "RGB" & Substitute ( LeftValues (Color3RGB; 1 ); ":" ; ";" ) ) )
J Posted October 31, 2005 Author Posted October 31, 2005 Also, what if I don't want to put the "(" or ")" around the number. If I leave one of the parens off, it shows black. J
comment Posted October 31, 2005 Posted October 31, 2005 If you want this to be cross-platform, use the "g" character in Webdings. See the attached file regarding your other questions. Fill2.fp7.zip
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now