My favorites | Sign in
Google
                
Search
for
Updated Feb 02, 2009 by ecc@google.com
Labels: Type-Widget
ProgressBar  
A Widget that displays progress over a range

Introduction

The ProgressBar Widget displays progress over a range of values. Users can dynamically change the minimum and maximum values in the range. When the current value is set, a bar will fill the widget up to the percent relative to the range.

Example: http://google-web-toolkit-incubator.googlecode.com/svn/trunk/demo/ProgressBar/index.html

CSS

Here is an example CSS style for the ProgressBar Widget:

.gwt-ProgressBar-shell {
  border: 2px solid #faf9f7;
  border-right: 2px solid #848280;
  border-bottom: 2px solid #848280;
  background-color: #AAAAAA;
  height: 14pt;
  width: 50%;
}
.gwt-ProgressBar-shell .gwt-ProgressBar-bar {
  background-color: #67A7E3;
}
.gwt-ProgressBar-shell .gwt-ProgressBar-text {
  padding: 0px;
  margin: 0px;
  color: white;
}

Sample Code

  ProgressBar bar = new ProgressBar(0.0, 2000.0 0.0);
  bar.setProgress(1500.0);
}}

Comment by Gengire, Dec 20, 2007

Found a typo, missing comma after to 2000.0 argument. Should be:

ProgressBar bar = new ProgressBar(0.0, 2000.0, 0.0);

bar.setProgress(1500.0);
}}

Comment by soledadfernandezw, Apr 06, 2008

On ie the bars height doesnt seem to be able to be less than around 10 or so. I want 5px. Works on Firefox.

Comment by soledadfernandezw, Apr 07, 2008

Nevermind...didnt realize it was a general ie css bug. fix i used was overflow:hidden.

Comment by ben.shive, Nov 21, 2008

Doesn't appear to work within a StackPanel??:

ProgressBar pb = new ProgressBar(0.0, 200.0, 100.0); pb.setWidth( "200px" ); stack.add(pb);

Did a little hunting via firebug, and it looks like the reason is it uses an inline absolute positioning.


Sign in to add a comment