Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shape object

Status
Not open for further replies.

riggie

IS-IT--Management
Nov 11, 2004
2
0
0
US
I can use the following to change a single shape brush to white, "Shape1->Brush->Color=clWhite;" but if I have say 10 shapes is there a easy way to change them all at once???
 
Put in for loop
for(int i=0; i<10; i++){
Shape1->Brush->Color=clWhite;&quot;
}
 
You are on the right track, the one step you forgot was to use the components property of the form, therefore your code would look something like this.

for(i=1;i<=count;i++)
{
if Components.ClassNameIs(&quot;TShape&quot;)
Components->Brush->Color = clwhite;
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top