add setPercent Method for progressbar