Re: [gtkmm] Colouring progress bars in gtkmm 1.2?



On Sat, 22 Mar 2003, Matthew Loh wrote:

> First off, thanks for taking the time.
>
> My question is how one goes about changing the colours of progress bars
> based on the amount of progress that has been accomplished - e.g. red when
> the bar is at 0 - 30%, yellow at 30 - 60%, green at 60 - 100%
>
> I was thinking maybe something to do with styles, but the gtkmm 1.2
> documentation is cryptic as ever.
>
> Thanks,
>
> Matt Loh


Hi,
The propblem when using styles is that you really can't
guarantee that the colors you specify in your application will
be honored. For example, the Pixmap/Pixbuf engine simply stretches
some predefined image to the proper size...

I'd suggest writing your own widget for this case...

Oh, and while you could simply specify the default style for that
particurlar widget, the UI inconsistency would be annoying, to
say the least.

Tassos

-- 
Bassoukos Tassos   +30 31 996011 / +30 93 7109954       IT Generalist

C++: an octopus made by nailing extra legs onto a dog
                                      -- Steve Taylor, 1998




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]