Raybaudi Posted March 15, 2005 Author Posted March 15, 2005 (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 ??
Raybaudi Posted March 15, 2005 Posted March 15, 2005 (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 ??
Raybaudi Posted March 15, 2005 Author Posted March 15, 2005 (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 ??
aaa Posted March 15, 2005 Posted March 15, 2005 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.
aaa Posted March 15, 2005 Posted March 15, 2005 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.
aaa Posted March 15, 2005 Posted March 15, 2005 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.
comment Posted March 15, 2005 Posted March 15, 2005 Hmmm... can not work? Not easy, perhaps, but can not work? --- edit --- fixed a minor bug affecting text with carriage returns
comment Posted March 15, 2005 Posted March 15, 2005 Hmmm... can not work? Not easy, perhaps, but can not work? --- edit --- fixed a minor bug affecting text with carriage returns
comment Posted March 15, 2005 Posted March 15, 2005 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
Raybaudi Posted March 15, 2005 Author Posted March 15, 2005 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)
Raybaudi Posted March 15, 2005 Author Posted March 15, 2005 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)
Raybaudi Posted March 15, 2005 Author Posted March 15, 2005 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)
Raybaudi Posted March 15, 2005 Author Posted March 15, 2005 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>
Raybaudi Posted March 15, 2005 Author Posted March 15, 2005 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>
Raybaudi Posted March 15, 2005 Author Posted March 15, 2005 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>
Raybaudi Posted March 15, 2005 Author Posted March 15, 2005 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 !
Raybaudi Posted March 15, 2005 Author Posted March 15, 2005 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 !
Raybaudi Posted March 15, 2005 Author Posted March 15, 2005 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 !
comment Posted March 15, 2005 Posted March 15, 2005 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?
comment Posted March 15, 2005 Posted March 15, 2005 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?
comment Posted March 15, 2005 Posted March 15, 2005 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?
Raybaudi Posted March 15, 2005 Author Posted March 15, 2005 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!
Raybaudi Posted March 15, 2005 Author Posted March 15, 2005 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!
Raybaudi Posted March 15, 2005 Author Posted March 15, 2005 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!
comment Posted March 15, 2005 Posted March 15, 2005 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?
comment Posted March 15, 2005 Posted March 15, 2005 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?
comment Posted March 15, 2005 Posted March 15, 2005 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?
Raybaudi Posted March 16, 2005 Author Posted March 16, 2005 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)...
Raybaudi Posted March 16, 2005 Author Posted March 16, 2005 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)...
Raybaudi Posted March 16, 2005 Author Posted March 16, 2005 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)...
aaa Posted March 16, 2005 Posted March 16, 2005 It is great, comment! I tried it in 7-th version(not developer), therefore thought that it is impossible.
aaa Posted March 16, 2005 Posted March 16, 2005 It is great, comment! I tried it in 7-th version(not developer), therefore thought that it is impossible.
aaa Posted March 16, 2005 Posted March 16, 2005 It is great, comment! I tried it in 7-th version(not developer), therefore thought that it is impossible.
Raybaudi Posted March 16, 2005 Author Posted March 16, 2005 Hi,Michael congratulations !! I have seen your CF in http://www.briandunning.com/filemaker-custom-functions/list.php
Raybaudi Posted March 16, 2005 Author Posted March 16, 2005 Hi,Michael congratulations !! I have seen your CF in http://www.briandunning.com/filemaker-custom-functions/list.php
Recommended Posts
This topic is 7192 days old. Please don't post here. Open a new topic instead.
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