March 15, 200520 yr Author (as always, i'm sorry for my English) GetRGB(field)... ...isn't a standard function of FM7 !! it gives the color of the text inside a field in the RGB(RRR;GGG;BBB)format. How you'll build that ??
March 15, 200520 yr (as always, i'm sorry for my English) GetRGB(field)... ...isn't a standard function of FM7 !! it gives the color of the text inside a field in the RGB(RRR;GGG;BBB)format. How you'll build that ??
March 15, 200520 yr Author (as always, i'm sorry for my English) GetRGB(field)... ...isn't a standard function of FM7 !! it gives the color of the text inside a field in the RGB(RRR;GGG;BBB)format. How you'll build that ??
March 15, 200520 yr I have this question to. I think that this function can not work, because one part of the text can have one color, other part can have other color.
March 15, 200520 yr I have this question to. I think that this function can not work, because one part of the text can have one color, other part can have other color.
March 15, 200520 yr I have this question to. I think that this function can not work, because one part of the text can have one color, other part can have other color.
March 15, 200520 yr Hmmm... can not work? Not easy, perhaps, but can not work? --- edit --- fixed a minor bug affecting text with carriage returns
March 15, 200520 yr Hmmm... can not work? Not easy, perhaps, but can not work? --- edit --- fixed a minor bug affecting text with carriage returns
March 15, 200520 yr Hmmm... can not work? Not easy, perhaps, but can not work? --- edit --- fixed a minor bug affecting text with carriage returns GetRGB_CF.fp7.zip
March 15, 200520 yr Author Hi, comment very good and ... very quick!! I have thought to use GetAsCSS() to. Thank you very much p.s. I think that there is something wrong... if you cancel the text field and write something else, the function don't evaluate correctly!(sorry)
March 15, 200520 yr Author Hi, comment very good and ... very quick!! I have thought to use GetAsCSS() to. Thank you very much p.s. I think that there is something wrong... if you cancel the text field and write something else, the function don't evaluate correctly!(sorry)
March 15, 200520 yr Author Hi, comment very good and ... very quick!! I have thought to use GetAsCSS() to. Thank you very much p.s. I think that there is something wrong... if you cancel the text field and write something else, the function don't evaluate correctly!(sorry)
March 15, 200520 yr Author There is a problem with Black RGB(0;0;0) ! My Italian version of GetAsCSS(field) gives me :<SPAN STYLE= "color: #000000;" >Black</SPAN> but your attachment gives: <SPAN STYLE= "">Black</SPAN>
March 15, 200520 yr Author There is a problem with Black RGB(0;0;0) ! My Italian version of GetAsCSS(field) gives me :<SPAN STYLE= "color: #000000;" >Black</SPAN> but your attachment gives: <SPAN STYLE= "">Black</SPAN>
March 15, 200520 yr Author There is a problem with Black RGB(0;0;0) ! My Italian version of GetAsCSS(field) gives me :<SPAN STYLE= "color: #000000;" >Black</SPAN> but your attachment gives: <SPAN STYLE= "">Black</SPAN>
March 15, 200520 yr Author I correct your attachment in this way: 1) field text = auto-enter calculation replaces existing value 2) calculation: If ( GetRGBvalues ( text ) <>""; text; TextColor ( text; RGB ( 0; 0; 0) )) ... but it's no good if black text comes after coloured text !
March 15, 200520 yr Author I correct your attachment in this way: 1) field text = auto-enter calculation replaces existing value 2) calculation: If ( GetRGBvalues ( text ) <>""; text; TextColor ( text; RGB ( 0; 0; 0) )) ... but it's no good if black text comes after coloured text !
March 15, 200520 yr Author I correct your attachment in this way: 1) field text = auto-enter calculation replaces existing value 2) calculation: If ( GetRGBvalues ( text ) <>""; text; TextColor ( text; RGB ( 0; 0; 0) )) ... but it's no good if black text comes after coloured text !
March 15, 200520 yr 1. I have replaced the attachment after fixing a small bug I have noticed. 2. My version indeed does not tag black text with a color attribute. If you don't want to see RGB ( 0; 0; 0 ), you can simply wrap the CF in a Substitute() function and remove it. 3. The function evaluates when you click outside the text field (like any other calculation). At least that's what's happening at my end. 4. If ( GetRGBvalues ( text ) <>""; text; TextColor ( text; RGB ( 0; 0; 0) )) What does this achieve? It appears to do nothing: if the text has no color attribute, replace it with black text?
March 15, 200520 yr 1. I have replaced the attachment after fixing a small bug I have noticed. 2. My version indeed does not tag black text with a color attribute. If you don't want to see RGB ( 0; 0; 0 ), you can simply wrap the CF in a Substitute() function and remove it. 3. The function evaluates when you click outside the text field (like any other calculation). At least that's what's happening at my end. 4. If ( GetRGBvalues ( text ) <>""; text; TextColor ( text; RGB ( 0; 0; 0) )) What does this achieve? It appears to do nothing: if the text has no color attribute, replace it with black text?
March 15, 200520 yr 1. I have replaced the attachment after fixing a small bug I have noticed. 2. My version indeed does not tag black text with a color attribute. If you don't want to see RGB ( 0; 0; 0 ), you can simply wrap the CF in a Substitute() function and remove it. 3. The function evaluates when you click outside the text field (like any other calculation). At least that's what's happening at my end. 4. If ( GetRGBvalues ( text ) <>""; text; TextColor ( text; RGB ( 0; 0; 0) )) What does this achieve? It appears to do nothing: if the text has no color attribute, replace it with black text?
March 15, 200520 yr Author Hi comment I downloaded your second attachment ... If you cancel the Text field and after write something, the Text field is writed black, so I expected to see cGetRGB to show 0;0;0 but it shows: "no color is definited" My version indeed does not tag black text with a color attribute. If you don't want to see RGB ( 0; 0; 0 ), you can simply wrap the CF in a Substitute() function and remove it. Yes, I wish to see RGB(0;0;0)...but never appears!
March 15, 200520 yr Author Hi comment I downloaded your second attachment ... If you cancel the Text field and after write something, the Text field is writed black, so I expected to see cGetRGB to show 0;0;0 but it shows: "no color is definited" My version indeed does not tag black text with a color attribute. If you don't want to see RGB ( 0; 0; 0 ), you can simply wrap the CF in a Substitute() function and remove it. Yes, I wish to see RGB(0;0;0)...but never appears!
March 15, 200520 yr Author Hi comment I downloaded your second attachment ... If you cancel the Text field and after write something, the Text field is writed black, so I expected to see cGetRGB to show 0;0;0 but it shows: "no color is definited" My version indeed does not tag black text with a color attribute. If you don't want to see RGB ( 0; 0; 0 ), you can simply wrap the CF in a Substitute() function and remove it. Yes, I wish to see RGB(0;0;0)...but never appears!
March 15, 200520 yr OK, I think now I understand what you want. Here's the thing: it says "no color is defined", because... no color is defined. You say you want to see RGB(0;0;0) in such case - but that is not correct. Switch to layout mode, and define another text color for the field, and you'll see why this cannot work. Imagine you have the same field on different layouts, or even duplicated on the same layout, and each instance is formatted with a different color. There is no way a calculation can access this information. The only indication is the CSS and this is empty - unless a color has been expressly defined to override the default setting. Perhaps it would be possible to determine if there is text WITHOUT a color tag, and if so, stick a RGB(0;0;0) tag in between. But I am not going to try. What's this good for anyway?
March 15, 200520 yr OK, I think now I understand what you want. Here's the thing: it says "no color is defined", because... no color is defined. You say you want to see RGB(0;0;0) in such case - but that is not correct. Switch to layout mode, and define another text color for the field, and you'll see why this cannot work. Imagine you have the same field on different layouts, or even duplicated on the same layout, and each instance is formatted with a different color. There is no way a calculation can access this information. The only indication is the CSS and this is empty - unless a color has been expressly defined to override the default setting. Perhaps it would be possible to determine if there is text WITHOUT a color tag, and if so, stick a RGB(0;0;0) tag in between. But I am not going to try. What's this good for anyway?
March 15, 200520 yr OK, I think now I understand what you want. Here's the thing: it says "no color is defined", because... no color is defined. You say you want to see RGB(0;0;0) in such case - but that is not correct. Switch to layout mode, and define another text color for the field, and you'll see why this cannot work. Imagine you have the same field on different layouts, or even duplicated on the same layout, and each instance is formatted with a different color. There is no way a calculation can access this information. The only indication is the CSS and this is empty - unless a color has been expressly defined to override the default setting. Perhaps it would be possible to determine if there is text WITHOUT a color tag, and if so, stick a RGB(0;0;0) tag in between. But I am not going to try. What's this good for anyway?
March 16, 200520 yr Author thank you very much for your kind replay You are right, of course ! So, it seems that CSS access the information about the color of text field only if it is different from that I had assigned in layout mode... for example, if I give it "Yellow" in layout mode, when I write something in Black in Browse mode, I finally have the RGB(0;0;0)...
March 16, 200520 yr Author thank you very much for your kind replay You are right, of course ! So, it seems that CSS access the information about the color of text field only if it is different from that I had assigned in layout mode... for example, if I give it "Yellow" in layout mode, when I write something in Black in Browse mode, I finally have the RGB(0;0;0)...
March 16, 200520 yr Author thank you very much for your kind replay You are right, of course ! So, it seems that CSS access the information about the color of text field only if it is different from that I had assigned in layout mode... for example, if I give it "Yellow" in layout mode, when I write something in Black in Browse mode, I finally have the RGB(0;0;0)...
March 16, 200520 yr It is great, comment! I tried it in 7-th version(not developer), therefore thought that it is impossible.
March 16, 200520 yr It is great, comment! I tried it in 7-th version(not developer), therefore thought that it is impossible.
March 16, 200520 yr It is great, comment! I tried it in 7-th version(not developer), therefore thought that it is impossible.
March 16, 200520 yr Author Hi,Michael congratulations !! I have seen your CF in http://www.briandunning.com/filemaker-custom-functions/list.php
March 16, 200520 yr Author Hi,Michael congratulations !! I have seen your CF in http://www.briandunning.com/filemaker-custom-functions/list.php
March 16, 200520 yr Author Hi,Michael congratulations !! I have seen your CF in http://www.briandunning.com/filemaker-custom-functions/list.php
Create an account or sign in to comment