Dismiss Notice

REGISTRATION IS AFTER ADMIN ACTIVATION

DONATIONS WITH PAYPAL CLICK TO BUTTON

1 MONTH VIP - 5$; 3 MONTHS VIP - 10$; 6 MONTHS VIP - 20$; 1 YEAR VIP - 30$; 2 YEARS VIP - 50$; GOLD USER FOR LIFE VIP - 150$

DONATIONS WITH Bitcoin Address:3NRs3CK3fhXifrNYxHEZKpETDd9vNLMsMD

Dismiss Notice
The registration is approved by the Administrator. It takes about 1 day to approve your registration
Dismiss Notice
For open hidden message no need write thanks, thank etc. Enough is click to like button on right side of thread.

Build A Progress Spinner Using Objects In Delphi XE6

Discussion in 'Delphi Android And IOS' started by N0body, Jul 2, 2014.

  1. N0body
    Online

    N0bodyN0body is a Verified Member DelphiFan Administrator Staff Member DF Staff

    [​IMG]

    Developer 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:

    Code:
    procedure TForm1.TrackBar1Change(Sender: TObject);
    begin
         if TrackBar1.Value <> 0 then
              Arc1.EndAngle := 360 / (100 / TrackBar1.Value)
         else Arc1.EndAngle := 0;
         Text1.Text := Trunc(TrackBar1.Value).ToString + ‘%’;
    end;

    Hidden Content:
    **Hidden Content: You must click 'Like' before you can see the hidden data contained here.**
     
    khon2514, c1zone and X2000X like this.
  2. gday
    Offline

    gday DF Junior

    RE:

    Thanks!
     
  3. vbm2002
    Offline

    vbm2002 DF Junior

    RE:

    Thank you
     
  4. alfonso
    Offline

    alfonso DF Junior

    RE:

    thanks
     
  5. guilhermeteodoro
    Offline

    guilhermeteodoro DF Member

    RE:

    Thanks...
     
  6. chrpaz
    Offline

    chrpaz Guest

    thanks
     
  7. barisatalay
    Offline

    barisatalay DF Senior

    RE:

    thanks
     
  8. lokicygnus
    Offline

    lokicygnus DF Member

    RE:

    thans
     
  9. programistait
    Offline

    programistait DF Junior

    RE:

    thx a lot
     
  10. ngbak
    Offline

    ngbak DF Member

    RE:

    [font=Verdana, Arial, sans-serif]thans[/font]
     
  11. perdcomp
    Offline

    perdcomp DF Junior

    thanks
     
  12. adrianomow
    Offline

    adrianomow Guest

  13. batman
    Offline

    batman DF Member

    RE:

    so nice
     
  14. windsoft0128
    Offline

    windsoft0128 Guest

  15. ztt10748
    Offline

    ztt10748 DF Junior

    thanks
     
  16. brionna
    Offline

    brionna Guest

    RE:

    thanks
     
  17. Speed Fury
    Offline

    Speed Fury DF Member

    RE:

    many thanks
     
  18. dseggq
    Offline

    dseggq DF Member

    RE:

    [font=Verdana, Arial, sans-serif]thanks[/font]
     
  19. lzd123
    Offline

    lzd123 Guest

    RE:

    very good ,thanks
     
  20. chafik
    Offline

    chafik DF Member

    RE:

    merci
     

Share This Page

Laws
Our website, law, laws, copyright and aims to be respectful of individual rights. Our site, as defined in the law of 5651 serves as a provider of space. According to the law, contrary to the law of site management has no obligation to monitor content. Therefore, our site has adopted the principle of fit and remove. Works are subject to copyright laws and is shared in a manner that violated their legal rights, or professional associations, rights holders who, adsdelphi@gmail.com I can reach us at e-mail address. Complaints considered to be infringing on the examination of the content will be removed from our site.
Donate Help To Us and Be VIP
DONATIONS WITH PAYPAL CLICK TO BUTTON
6 MONTHS VIP - 20$; 1 YEAR VIP - 30$; 2 YEARS VIP - 50$; GOLD USER FOR LIFE VIP - 150$
Social Block