|
(cpp파일)
void__fastcall TMyPanel::TMyPanel(TComponent* Owner)
: TPanel(Owner)
{
MyButton1 = new TButton(this);
MyButton1->Parent = this;
MyButton2 = new TButton(this);
MyButton2->Parent = this;
Height = 22;
Width = 103;
Caption = "";
MyButton1->Top = 1;
MyButton1->Left = 0;
MyButton1->Height = 20;
MyButton1->Width = 50;
MyButton2->Top = 1;
MyButton2->Left = 53;
MyButton2->Height = 20;
MyButton2->Width = 50;
}
//---------------------------------------------------------------------------
void __fastcall MyButton1Click(TObject *Sender)
{
ShowMessage("Button1 Click!");
}
//---------------------------------------------------------------------------
void __fastcall MyButton2Click(TObject *Sender)
{
ShowMessage("Button2 Click!");
}
//---------------------------------------------------------------------------
(h화일)
class PACKAGE TMyPanel : public TPanel
{
private:
TButton * MyButton1;
TButton * MyButton2;
void __fastcall MyButton1Click(TObject *Sender);
void __fastcall MyButton2Click(TObject *Sender);
protected:
public:
__fastcall TMyPanel(TComponent* Owner);
__published:
};
컴포넌트소스거덩여... 컴포넌트 컴파일하고 등록하고 사용했는데 버튼을 눌러도 ShowMessage가 안뜨거덩여...
이런거 어떻게 해야하나여?
넘 초보적인 질문인것같지만.. 물어볼 사람이 없어서.. 저혼자 맨땅에 해딩하기가 넘 어렵네여...
패널위에 놓인 버튼을 컨트롤할수 있는 방법좀 가르쳐주셨으면... 올리는것도 얼마전에 여기서 배워지여...
날로 다 먹는다고 생각하지 마세여... 벌써 2주째 맨땅에 해딩입니다.. ㅠ.ㅠ
그럼 새해복많이 받으세여... 꾸벅(-.-)(_._)(-.-)
|