Article View: borland.public.cppbuilder.database.ado
Article #5069TShape Array
From: Joff
Date: Sun, 12 Aug 2001 12:53
Date: Sun, 12 Aug 2001 12:53
32 lines
1591 bytes
1591 bytes
Hi everyone,
I am trying to create an array of TShapes. So far I have tried the
following:
In the form header:
ShapeArray[11] *TShape;
In the forms FormCreate section I have put in this code:
for(i = 0; i <= 11; i++)
{
ShapeArray[i]->Shape = stSquare;
ShapeArray[i]->Top = 100;
ShapeArray[i]->Left = 100;
ShapeArray[i]->Width = 25;
ShapeArray[i]->Height = 25;
ShapeArray[i]->Brush->Color = clRed;
ShapeArray[i]->Visible = false;
ShapeArray[i]->Enabled = true;
}
The result is an access violation and the program fails.
I have tried to create the shape object not in an array and this runs but no
TShape object appears on the form.
Can anyone help me to get this working?
Thanks
Joff
Technical Details
Message-ID:
<3b767b5c_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!intgwpad.nntp.telstra.net!intgwlon.nntp.telstra.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,a9a01fba6d2ee27f,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-08-12 05:52:28 PST From: "Joff" <joff@boeingmail.com> Newsgroups: borland.public.cppbuilder.database.ado Subject: TShape Array Date: Sun, 12 Aug 2001 13:53:45 +0100 Lines: 34 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 NNTP-Posting-Host: 195.8.75.89 Message-ID: <3b767b5c_1@dnews> X-Trace: dnews 997620572 195.8.75.89 (12 Aug 2001 05:49:32 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!intgwpad.nntp.telstra.net!intgwlon.nntp.telstra.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews