KOD cpp: UKRYJ
void __fastcall TForm1::Label1Click(TObject *Sender)
{
int x = dynamic_cast<TLabel *>(Sender)->Tag;
TPanel *tPanel = dynamic_cast<TPanel *>(FindComponent("Panel" + (String)x));
if(tPanel->Height > 23)
{
for(int i = 120; i > 23; i -= 5)
{
tPanel->Height = i;
Application->ProcessMessages();
}
tPanel->Height = 23;
}
else
{
for(int i = 23; i < 120; i += 5)
{
tPanel->Height = i;
Application->ProcessMessages();
}
tPanel->Height = 120;
}
}
{
int x = dynamic_cast<TLabel *>(Sender)->Tag;
TPanel *tPanel = dynamic_cast<TPanel *>(FindComponent("Panel" + (String)x));
if(tPanel->Height > 23)
{
for(int i = 120; i > 23; i -= 5)
{
tPanel->Height = i;
Application->ProcessMessages();
}
tPanel->Height = 23;
}
else
{
for(int i = 23; i < 120; i += 5)
{
tPanel->Height = i;
Application->ProcessMessages();
}
tPanel->Height = 120;
}
}
Żadnego kodu więcej nie ma.