Dialog form - updating label control
Hi
I'm using an application which uses Fast Reports as the reporting tool. I'm using Pascal script for the scripting.
I am generating the data required for the report from a button in a dialog form with the button set as ModalResult = mrOK.
I am trying to update the caption of a label on the form to notify the user of the progress of the data generation. The gathering of the data takes quite a while, so I want the user to see the progress.
However the label caption does not update.
If I put a showmessage( 'status update') statement immediately after the statement which updates the label's caption, , then the label caption on the form refreshes.
Is there any way of forcing the form to update the label caption?
Any other ideas of notifying the user as to the progress of the data (not report/page) generation would be appreciated.
Thanks
I'm using an application which uses Fast Reports as the reporting tool. I'm using Pascal script for the scripting.
I am generating the data required for the report from a button in a dialog form with the button set as ModalResult = mrOK.
I am trying to update the caption of a label on the form to notify the user of the progress of the data generation. The gathering of the data takes quite a while, so I want the user to see the progress.
However the label caption does not update.
If I put a showmessage( 'status update') statement immediately after the statement which updates the label's caption, , then the label caption on the form refreshes.
Is there any way of forcing the form to update the label caption?
Any other ideas of notifying the user as to the progress of the data (not report/page) generation would be appreciated.
Thanks
Comments
Mick
Thanks for the suggestion.
However when I remove the ShowMessage('Next step ...') line (I don't want this as the user would have to click through each message), the label's caption still does not update (which is exactly what I was experiencing without creating a new form).
What I noticed was I can change the myform.caption and this refreshes - however this is not ideal.
MyLabel.update;
There is no update method - Getting an error - Unidentified identifier: 'Update'
Thanks! I simply added application.processmessages after the label.caption := line and the label now updates.
Appears as if you need application.processmessages to update label captions but not form caption.