JavaScript Editor JavaScript Editor     JavaScript Debugger

Previous Section Next Section

Main Page

Progress Bars

Progress bars are those simple controls that show the progress of some operation by displaying rectangles in a horizontal bar, as you see in Figure 10.6, which is the ProgressBars example on the CD-ROM. In this case, the progress bar is being drawn using timer events that start when you click the Start button. When the operation finishes, the progress bar is filled; the idea here is to give the user some visual feedback on how the operation is progressing, and how long it will take.

Figure 10.6: A progress bar at work.

The main properties of a progress bar are Value, Minimum, and Maximum. You use the Minimum and Maximum properties to set the maximum and minimum values the progress bar can display. (The minimum is represented by one rectangle.) To change the display, you write code to set the Value property. For example, if the Maximum property is set to 100, the Minimum property is set to 10, and the Value property is set to 60, then 6 rectangles will appear.

Previous Section Next Section

JavaScript Editor Free JavaScript Editor     JavaScript Editor