Build A Progress Spinner Using Objects In Delphi XE6 Firemonkey On Android And IOS

Delphi XE6 Firemonkey Progress Circle TutorialDeveloper OneChen has a demo project up on GitHub showing how to build a progress circle using basic Firemonkey components. As you can see in the featured image it is a circle with a percentage in the center and a progress line around the inside of the circle. It is composed of a TCircle component with a TArc, a TCircle, and a TText component nested inside of it. These components are available in Delphi XE5, Delphi XE6, C++Builder, and AppMethod. They should also work on all four platforms (Android, IOS, Windows, and OSX) The TArc makes up the white line on the inside that appears to move around the circle. The round ends of the TArc are achieved by changing the Stroke Cap property to Round instead of Flat. The progress of the line is controlled by simply changing the angle of the TArc component. As you change the angle the line appears to move around the circle. Other notable properties of the effect are Stroke Thickness which controls the size of the line and it is set at 15. And lastly the StartAngle property of the TArc is set to -90. The TCircle in the center is just set to align Client and so is the TText which contains the percentage. The object is built up using other objects so it would be easy to customize the colors to your needs. You could also easily include this code with a TTimer or anonymous thread to replace TAniIndicator if that component doesn’t suite your needs. Here is the code that handles the progress setting of the TArc component:

Head over and check out the full Delphi XE6 Firemonkey progress circle demo project and download it from GitHub.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Build A Progress Spinner Using Objects In Delphi XE6 Firemonkey On Android And IOS by Delphi XE5 XE6 XE7 XE8 10 Seattle Berlin Firemonkey, Delphi Android, Delphi IOS is licensed under a Creative Commons Attribution 4.0 International License.

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
Delphi XE6 Firemonkey REST DataSet To Request Adapter JSON
Automatically JSON Serialize A DataSet For REST In Delphi XE6 Firemonkey On Android And IOS

Andrea Magni from Italy has a blog post up with a new component called TDataSetRESTRequestAdapter for Delphi XE6 Firemonkey (and...