Blog Posts

 

info ellab.ru/download/instr


Name: info ellab.ru/download/instr
Category: Downloads
Published: asaramme1970
Language: English

 


 


 

 

 

 

 

 

 


 


 


 


 


 


 


 


 


 


 


 


 


 


 


 


 


 

Advanced Delphi Programming.
» Delphi Handbook.
Marquee and More for Progress Bar Controls.
The ProgressBar component is another common control that got extended features over the last few years that were not directly supported by the VCL. If you are not using runtime themes you can set a custom color for the bar and its background, using the BarColor and BackgroundColor properties.
A nice feature, available on Windows XP and Vista, is the marquee style of the progress bar, in which the bar keeps moving to show the program is working without indicating a specific position. This is a good option in situations in which you don't know how much time the operation will take, but still indicate to the user to wait as the requested operation is taking place. To enable this, set the Style property to pbstMarquee and optionally change the default value for the MarqueeInterval property, to make the graphic element move slower or faster. As an example, these are the settings of the first ProgressBar of the SuperProgress demo:
object ProgressBar1: TProgressBar Style = pbstMarquee MarqueeInterval = 20 end.
On Windows Vista, the ProgressBar control has an extended feature, called smooth reverse. If you are setting a progress position and you are advancing it by a large amount the control will generally move smoothly (with a sort of animation) to the new position. By activating smooth reverse the same happens if you have to (unexpectedly) move the progress Position backwards: rather than jumping back, it will gradually get there.
This effect cannot be captured by a static image, so you should try the SuperProgress demo for yourself. The second and third controls of the demo differ only by the value of the SmoothReverse property. There are three buttons below the progress bar that let you loop or move them back and forth, to experiment with the visual effect. The code is fairly trivial, so I've omitted it from the text of the book.
Three radio buttons on the side of the main form of the example let you change the State property of the second ProgressBar. This is another new property of the control in Delphi 2009. You can change the default state to a paused or error state, and the green progress bar will change to yellow or red respectively:
Sender: TObject); begi n case RadioGroup1.ItemIndex of.
0: ProgressBar2.State := pbsNormal; 1: ProgressBar2.State := pbsError; 2: ProgressBar2.State := pbsPaused; end; end;
Was this article helpful?
Project Management Made Easy.
What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

http://silkcerreli1970.eklablog.com/a2-uploader-download-free-busin...

Views: 1

Comments are closed for this blog post

© 2024   Created by PH the vintage.   Powered by

Badges  |  Report an Issue  |  Terms of Service