C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[74528] 이거 왜이럴까요,,,,
오스 [] 3648 읽음    2017-08-05 19:01
//---------------------------------------------------------------------------

#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에서 일케짜봤는데 그럼 라텐글과 라벨이 같이 생성되야하는데 라텐글만생성되거 라벨은 생성이 안되네요..........하....................... 왜 안되는지좀 알려주세요 ㅠㅠㅠ

+ -

관련 글 리스트
74528 이거 왜이럴까요,,,, 오스 3648 2017/08/05
74529     Re:이거 왜이럴까요,,,, 송신영 3695 2017/08/07
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.