![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Sep 2005
Posts: 21
Rep Power: 0
![]() |
Setting Label Caption Is delayed
I'm trying to keep a status bar telling the user what the program is doing. However, when I set the caption on the status label, it seems to be delayed. For instance:
Label3.Caption := 'Reading data from file...'; // Read Data from file into string list while not EOF(SomeTxtFile) do begin ReadLn(SomeTxtFile, buffer); string_list.Add(Trim(buffer)); Memo1.Lines.Add(buffer); end; When my program gets to this code, Label3 does not change to "Reading data from file...", and the loop runs. At the very end of my program, I do: Label3.Caption := 'Done.'; and that is the only time the Caption gets changed during the entire program. Does anyone have any ideas on why this happens? I'm new to Delphi so I'm not sure if there is a delay or what. |
|
|
|
|
|
#2 |
|
Newbie
|
Try placing
refresh; after the Label3.Caption line. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|