Hi!
I want to have an activity indicator working (active) while the query is still processing data.
How is it possible?
ActivityIndicator1.Active:=true;
qUniQuery1.Execute;
ActivityIndicator1.Active:=false;
I tryied to use threads/tasks but it did not work!
Thanks in advance...
Use ActivityIndicator while a query finishes
-
- Posts: 33
- Joined: Tue 25 Nov 2014 17:26
Re: Use ActivityIndicator while a query finishes
Hello,
I do believe you will need to run query in a thread in order to have your animation/indicator to be able to "animate/display as expected".
Otherwise, query execution will run on GUI thread (aka main thread) and your result will not be as expected. Your shared code is exactly this second case here.
I do believe you will need to run query in a thread in order to have your animation/indicator to be able to "animate/display as expected".
Otherwise, query execution will run on GUI thread (aka main thread) and your result will not be as expected. Your shared code is exactly this second case here.
-
- Posts: 33
- Joined: Tue 25 Nov 2014 17:26
Re: Use ActivityIndicator while a query finishes
Can you show a sample code?
Please!
Please!
Re: Use ActivityIndicator while a query finishes
UniAC itself can change the cursor to hourglass while executing the query and fetching data. For this, it is enough to add the UniDACVcl module to the uses section of your module.felixbcastillo wrote: ↑Sun 22 Mar 2020 03:42 Hi!
I want to have an activity indicator working (active) while the query is still processing data.
How is it possible?
ActivityIndicator1.Active:=true;
qUniQuery1.Execute;
ActivityIndicator1.Active:=false;
I tryied to use threads/tasks but it did not work!
Thanks in advance...
-
- Posts: 33
- Joined: Tue 25 Nov 2014 17:26
Re: Use ActivityIndicator while a query finishes
Well, you do not say what I want to hear!
Can I custom that hourglass cursor?
Can I use an animated cursor?
Thanks in advance...
Can I custom that hourglass cursor?
Can I use an animated cursor?
Thanks in advance...
Re: Use ActivityIndicator while a query finishes
After adding UniDACVcl.pas to your project, the cursor will be changed to hourglass cursor, but won't be customizable. If you'd like to customize the cursor, you have two options: 1) get UniDAC Professional with source code and change the cursor, which appears after adding UniDAcVcl, yourself. 2) implement the needed functionality yourself, without involving UniDACVcl.