//---------------------------------------------------------------------------
#include <fmx.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.fmx"
TForm1 *Form1;
TLabel *Label[100];
TRectangle *sha[100];
int g=0,i=0,a[4];
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::comehere(AnsiString a, int b, int c)
{
sha[i]=new TRectangle(this);
sha[i]->Parent=this;
sha[i]->Position->X=320;
sha[i]->Position->Y=72+g;
g=g+60;
sha[i]->Height=50;
sha[i]->Width=c;
sha[i]->Stroke->Color=NULL;
sha[i]->Fill->Color=b;
i++;
Label[i]=new TLabel(this);
Label[i]->Parent=sha[i];
Label[i]->Text=a;
Label[i]->Align=L->Align;
Label[i]->StyledSettings=L->StyledSettings >> TStyledSetting::ssFamily >> TStyledSetting::ssSize >> TStyledSetting::ssFontColor >> TStyledSetting::ssStyle;
Label[i]->TextSettings->HorzAlign=L->TextSettings->HorzAlign;
Label[i]->TextSettings->VertAlign=L->TextSettings->VertAlign;
Label[i]->Font->Size=15;
Label[i]->FontColor=L->FontColor;
//Line1->Height+=70;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Rectangle1Click(TObject *Sender)
{
comehere(Label1->Text, Rectangle1->Fill->Color,Rectangle1->Width);
}
//---------------------------------------------------------------------------
RAD에서 일케짜봤는데 그럼 라텐글과 라벨이 같이 생성되야하는데 라텐글만생성되거 라벨은 생성이 안되네요..........하....................... 왜 안되는지좀 알려주세요 ㅠㅠㅠ
|