My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
ProgressBar  
A Widget that displays progress over a range
Type-Widget
Updated Feb 4, 2010 by rjrjr@google.com

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 Geng...@gmail.com, 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 soledadf...@gmail.com, Apr 6, 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 soledadf...@gmail.com, Apr 7, 2008

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

Comment by ben.sh...@gmail.com, 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.

Comment by noa.kald...@gmail.com, Dec 5, 2010

sss\

Comment by Berg...@gmail.com, Dec 8, 2010

How would one go about in changing color of the ProgressBar's fill color (the bar-color) based on progresslevel?

Cheers


Sign in to add a comment
Powered by Google Project Hosting