I've made the following code to set a color for alle edit fields in a form:
TComponent *cp;
int nc = ComponentCount;
for (int i=0; i<nc; i++) {
cp = Components;
if(cp->InheritsFrom(__classid(TCustomEdit)))
((TCustomEdit*)cp)->Color = clBtnFace;
}
Got compile error in last line:
TControl::Color is not accessible.
What's wrong?
TComponent *cp;
int nc = ComponentCount;
for (int i=0; i<nc; i++) {
cp = Components;
if(cp->InheritsFrom(__classid(TCustomEdit)))
((TCustomEdit*)cp)->Color = clBtnFace;
}
Got compile error in last line:
TControl::Color is not accessible.
What's wrong?