M
Me
Hey,
First, what i have is a form and a few panels. my code:
if(Partytent->Panel5x5a->Left+Partytent->Panel5x5a->Width >=
Partytent->Panel5x5b->Left-2 && Partytent->Panel5x5a->Top >=
Partytent->Panel5x5b->Top-5 && Partytent->Panel5x5a
->Top+Partytent->Panel5x5a->Height <=
Partytent->Panel5x5b->Top+Partytent->Panel5x5b
->Height+5 && Partytent->Panel5x5a->Left+Partytent->Panel5x5a->Width <=
Partytent
->Panel5x5b->Left+1){
left=1;
}
else
left=0;
Allright, this is a little difficult, so in steps:
The first pointer in the if-statement is:
Partytent->Panel5x5a->Left
What i want is a function where i can give "5x5" with, "a", so
something like this:
void __fastcall TPartytent::checkAfstandTenten(TObject *Sender, String
TypeEerste, String TypeTweede) {
String tmp;
tmp="Partytent->Panel" + TypeEerste + een + "->Left";
and then in the if-statement: if(tmp==100){} for example.
So anyone think this is possible? Or how to do this anyway? The pointer
still has to point to the panel.
I want to change the pointer by call of this function.
First, what i have is a form and a few panels. my code:
if(Partytent->Panel5x5a->Left+Partytent->Panel5x5a->Width >=
Partytent->Panel5x5b->Left-2 && Partytent->Panel5x5a->Top >=
Partytent->Panel5x5b->Top-5 && Partytent->Panel5x5a
->Top+Partytent->Panel5x5a->Height <=
Partytent->Panel5x5b->Top+Partytent->Panel5x5b
->Height+5 && Partytent->Panel5x5a->Left+Partytent->Panel5x5a->Width <=
Partytent
->Panel5x5b->Left+1){
left=1;
}
else
left=0;
Allright, this is a little difficult, so in steps:
The first pointer in the if-statement is:
Partytent->Panel5x5a->Left
What i want is a function where i can give "5x5" with, "a", so
something like this:
void __fastcall TPartytent::checkAfstandTenten(TObject *Sender, String
TypeEerste, String TypeTweede) {
String tmp;
tmp="Partytent->Panel" + TypeEerste + een + "->Left";
and then in the if-statement: if(tmp==100){} for example.
So anyone think this is possible? Or how to do this anyway? The pointer
still has to point to the panel.
I want to change the pointer by call of this function.