Mam na formularzu:Shape1, Shape2, Label2, Label2. Chciałbym aby po przeciągnięciu shape2 na shape1 wypisało w Label1: FUCK YEAH". Ale nawet nie wyświetla mi się: "Status: Drag Started". Możecie powiedzieć co robięnie tal?
void __fastcall TForm1::Shape1DragOver(TObject *Sender, TObject *Source, int X, int Y,
TDragState State, bool &Accept)
{
if (Source == Shape2) Accept = true;
else Accept = false;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Shape2StartDrag(TObject *Sender, TDragObject *&DragObject)
{
Label1->Caption = "Status: Drag Started";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Shape2EndDrag(TObject *Sender, TObject *Target, int X, int Y)
{
if (Target == Shape1)
Label1->Caption = "Status: Drag Accepted";
else
Label1->Caption = "Status: Drag Aborted";
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Shape1DragDrop(TObject *Sender, TObject *Source, int X, int Y)
{
Label2->Caption="FUCK YEAH !!!!!!!!!";
}