Helper methods to set the progress bar.