# Tk Progress Bar color

**URL:** <https://www.ruby-forum.com/t/tk-progress-bar-color/167597>\
**Category:** Ruby\
**Created:** [May 9, 2009, 10:56pm UTC](https://www.ruby-forum.com/t/tk-progress-bar-color/167597 "2009-05-09T22:56:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/5f9b8f/32.png) [@sam](https://www.ruby-forum.com/u/sam)\
**Post date:** [May 9, 2009, 10:56pm UTC](https://www.ruby-forum.com/t/tk-progress-bar-color/167597/1 "2009-05-09T22:56:11Z")

</div>

Anyone know how to change the color of the Tk progress bar? Everything  
I try just ends up with:

/usr/lib/ruby/1.8/tk.rb:2762:in `\_\_invoke’: unknown option “-colors”

But all the documentation stats that it does have a colors option:

> **[Ruby/TK - ProgressBar Widget](http://www.tutorialspoint.com/ruby/ruby_tk_progressbar.htm)**
>
> Ruby TK ProgressBar Widget - A ProgressBar provides a widget, which will show a graphical representation of a value, given maximum and minimum reference values.

Thanks,  
Sam

---

<div class="post-metadata">

**Author:** ![sam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/5f9b8f/32.png) [@sam](https://www.ruby-forum.com/u/sam)\
**Post date:** [May 11, 2009, 4:00am UTC](https://www.ruby-forum.com/t/tk-progress-bar-color/167597/2 "2009-05-11T04:00:34Z")

</div>

From: Sam [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Tk Progress Bar color  
Date: Sun, 10 May 2009 05:55:35 +0900  
Message-ID: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> Anyone know how to change the color of the Tk progress bar? Everything  
> I try just ends up with:
> 
> /usr/lib/ruby/1.8/tk.rb:2762:in `\_\_invoke’: unknown option “-colors”
> 
> But all the documentation stats that it does have a colors option:  
> [Ruby/TK - ProgressBar Widget](http://www.tutorialspoint.com/ruby/ruby_tk_progressbar.htm)

Supported options depends on your version of BWidget libraries.  
Probably, your progressbar widget is old and doesn’t support  
‘colors’ option.  
You can check supported options and status of a widget by ‘configinfo’  
method or ‘current\_configinfo’ method.  
If your progressbar widget is one of an old version, ‘foreground’  
option can change its bar color.

---

<div class="post-metadata">

**Author:** ![sam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/5f9b8f/32.png) [@sam](https://www.ruby-forum.com/u/sam)\
**Post date:** [May 12, 2009, 2:15pm UTC](https://www.ruby-forum.com/t/tk-progress-bar-color/167597/3 "2009-05-12T14:15:51Z")

</div>

Hidetoshi NAGAI wrote:

> > [Ruby/TK - ProgressBar Widget](http://www.tutorialspoint.com/ruby/ruby_tk_progressbar.htm)
> 
> Supported options depends on your version of BWidget libraries.  
> Probably, your progressbar widget is old and doesn’t support  
> ‘colors’ option.  
> You can check supported options and status of a widget by ‘configinfo’  
> method or ‘current\_configinfo’ method.  
> If your progressbar widget is one of an old version, ‘foreground’  
> option can change its bar color.

Yes the foreground option worked. Thank you  
Sam
