OBJECT SET COLOR issue or misunderstanding?


I’m back to 4D after almost 20 years, and (mostly) really loving it, but am running into a minor issue that I’m not sure is a bug or a known limitation (or my own misunderstanding):

The following code doesn’t do what I’m expecting:

OBJECT SET COLOR(rPmtTypeCheck;Light grey;Light grey)

This disables the radio button, but because I could hardly tell that it was disabled (the label text remained black), I decided to call set color. But all it does is turn the label text blue. Am I doing something stupid, or are radio buttons not affected by OBJECT SET COLOR? Here’s a screen shot:

[]32903294;“Your comment here…”[/]

the easiest way is to set the text colour of the radio box to “automatic” (as opposed to black)

this way, when the button is disabled, it will automatically grey out.

as for changing the colour, the command O. SET COLOR uses https://doc.4d.com/4Dv16/4D/16.6/OBJECT-SET-COLOR.301-4445049.en.htmla rather antiquated syntax> that involves a palette index, negating and some bitwise operation.

https://doc.4d.com/4Dv17/4D/17.3/OBJECT-SET-RGB-COLORS.301-4621362.en.htmlO. SET RGB COLORS> is the current command.

Thank you very much, OBJECT SET RGB COLORS did the trick! I never even noticed this call (probably because I stopped looking for anything else once I’d found the old API call). Thanks again!