Hi all,
If I call the fastcall below for the first time, nothing is displayed in the listbox(remains empty). If I call the fastcall for a second time the values (Index, EnergyX, and EnergyY) are displayed in the listbox.
Any idea why ?
Thanks in advance
Johan
//--------------------------------------------------------
void __fastcall TMainForm::bDebugPageClick(TObject *Sender)
{
int i;
AnsiString MsgStr;
DebugPage->ShowModal();
DebugPage->Label1->Caption = "Index:";
DebugPage->Label2->Caption = "EnergyX:";
DebugPage->Label3->Caption = "EnergyY:";
for (i = 600; i <= 1000; i++) {
MsgStr = AnsiString(i) + "" + AnsiString(EnergyX) + "" + AnsiString(EnergyY);
DebugPage->ListBox1->Items->Add(MsgStr);
}
}
//--------------------------------------------------------
If I call the fastcall below for the first time, nothing is displayed in the listbox(remains empty). If I call the fastcall for a second time the values (Index, EnergyX, and EnergyY) are displayed in the listbox.
Any idea why ?
Thanks in advance
Johan
//--------------------------------------------------------
void __fastcall TMainForm::bDebugPageClick(TObject *Sender)
{
int i;
AnsiString MsgStr;
DebugPage->ShowModal();
DebugPage->Label1->Caption = "Index:";
DebugPage->Label2->Caption = "EnergyX:";
DebugPage->Label3->Caption = "EnergyY:";
for (i = 600; i <= 1000; i++) {
MsgStr = AnsiString(i) + "" + AnsiString(EnergyX) + "" + AnsiString(EnergyY);
DebugPage->ListBox1->Items->Add(MsgStr);
}
}
//--------------------------------------------------------