Hi y'all!
Ok, so I wrote this little procedure to give a preview of some questions that will appear later on in the program and their specific category codes.
Ques is a
TLabel and Start is a
TButton.
procedure TForm1.StartClick(Sender: TObject);
begin
For x:=1 to 24 do
Begin
Ques.caption:= Questions[x] +' '+QuestionCats[x];
Sleep(500);
end;
end;
The problem is that when I click the button, some time goes by and then the LAST question with it's appropriate code appears.
I would have thought that the first question and its code appears and the program waits a bit, then the second question and its code appears and it waits until the last question. Why doesn't the new label caption appear each iteration of the for loop?