Jump to content

How To Show Changes To TUniStatusBar's Panel Text Immediately?


Frederick

Recommended Posts

I have a TUniStatusBar where I have one panel with a text of "Ready". When I click a button to perform some database processing (which takes about 2 seconds), I would like to change the panel's text to "Processing..." at the start of the process.

However, the panel's text never changes to "Processing...". What can I do to get the text of the panel to change immediately once the button is clicked?

begin
   UniStatusBar1.Panels[0].Text:='Processing...';   // This is not handled?

   // some database processing
end;

--
Frederick
(UniGUI Complete - Professional Edition 1.90.0.1534)
 

Link to comment
Share on other sites

1 hour ago, Frederick said:

UniStatusBar1.Panels[0].Text:='Processing...';   // This is not handled?

Hello,

Here are some solutions to this problem.

First:

UniMainModule.EnableSynchronousOperations > True

Related demos: 

\FMSoft\Framework\uniGUI\Demos\Desktop\SyncClientUpdate

http://unigui.com/doc/online_help/synch-and-asynch-operations.htm

 

Second:

Using ClientEvents...

Link to comment
Share on other sites

2 hours ago, Sherzod said:

Hello,

Here are some solutions to this problem.

First:

UniMainModule.EnableSynchronousOperations > True

Related demos: 


\FMSoft\Framework\uniGUI\Demos\Desktop\SyncClientUpdate

http://unigui.com/doc/online_help/synch-and-asynch-operations.htm

 

Second:

Using ClientEvents...

Thanks. Looking at the demo, it seems that I need to treat the database processing as a main thread and update the visual controls on the side.

I will explore this further.

BTW, my EnableSynchronousOperations property of UniMainModule is already set to True.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...