Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to force update of label / text before procedure

Status
Not open for further replies.

LEICJDN1

Technical User
Nov 27, 2002
201
GB
Hi,

One the image is loaded, I automatically call a procedure to rotate a bitmap, which works fine. I want to display a message on the form using either label.caption or canvas.textout or statictext.caption to inform the user rotation is in progress(i.e. not a message as don't want to have to click to continue).

The rotate routine creates a progressbar and this updates fine. However, text sent to the form does not appear until after the rotate procedure has completed despite being at the start of the procedure.

Is there a way to send the text, force a refresh so it is visible, and then start the procedure?

Thanks.
 
Hi!

Inside the While or For loop , add this line

Application.ProcessMessages;

though it will slow down the loop a bit.

Or after you set the Label.Caption just refresh the label, this is not as slow as using Application.ProcessMessages.

Label1.Caption := 'Testing123';
Label1.Refresh;

See Delphi Help for more info on the methods mentioned.

 
Gauge component can be refresh when runing in procedure.you use it would be nice.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top