|
자답입니다.
(TWinControl*)StreamLabel1;
이부분이 틀렸네요 TWinControl 계열이 아니라서 parent 가 될수가 없네요
그래서...Panel위에다 올리기로 했슴다....
박용우 님이 쓰신 글 :
: __fastcall TForm1::TForm1(TComponent* Owner)
: : TForm(Owner)
: {
: TBevel *StreamBevel1;
: StreamBevel1 = new TBevel(this);
: StreamBevel1->Parent = this;
: StreamBevel1->Left = 100;
: StreamBevel1->Top = 100;
: StreamBevel1->Width = 100;
: StreamBevel1->Height = 100;
:
: TLabel *StreamLabel1;
: StreamLabel1 = new TLabel(this);
: StreamLabel1->Parent = (TWinControl*)StreamLabel1;
: StreamLabel1->Width = 75;
: StreamLabel1->Height = 17;
: StreamLabel1->Left = 10;
: StreamLabel1->Top = 10;
: StreamLabel1->Caption = "라벨 1";
: }
: //---------------------------------------------------------------------------
:
: 에러 메세지 보면요... "a control cannot have itself as its parent" 라고 나옵니다
:
: 베벨에 라벨 4개를 올리려고 해요..
: 그렇게 만든 베벨을 20개 만들려고 하는데요...
:
|