How to make progress bar invisible?

Hello,

I am using the progress bar component “hack” for polling the server and updating an image that displays CPU usage.

I have been able to successfully do this, but I have been unable to make the progress bar disappear unless I set the following value in the styles.css:

.i-progressindicator {
display: none;
}

Which I do not want to do since it makes all the progress bars disappear.

According to the documentation and posts on the forums I have created my progress bar as such:

// Create the indicator
final ProgressIndicator indicator = new ProgressIndicator(new Float(0.0));
indicator.addStyleName(“invisible”);
main.addComponent(indicator);

indicator.setPollingInterval(2000);

And my styles.css file has:
.i-progressindicator-invisible {
display: none;
}

But the progress bar is still visible.

I have tried using IT Mill Toolkit 5.3.0 RC5 and RC7.

Please help. I have posted a screenshot from firebug:
http://www.2shared.com/file/4592608/2225d4fd/screen01.html

Thanks,
Ajay

The addStyleName() method does not seem to work for ProgressIndicator. It has broken at some point. This is a bug.
http://dev.itmill.com/ticket/2420
.

Marko,

Thanks for your reply!

Are there any workarounds for this at the moment (aside from making all progress bars disappear)?

Thanks,
Ajay

Hi,

Ticket #2420 has been fixed today and the fix will be included in the next nightly and also in 5.3.0RC8. I am not aware of any good workaround at the moment.

As a workaround, you can set a style name for the layout surrounding the progressbar, and use that in your css.


layout.setStyleName("invisible");
layout.addComponent(progressindicator);
.i-orderedlayout-invisible .i-progressindicator {
     display: none;
}

Thanks for the suggestion Marc, that worked. :slight_smile:

Ajay