gauge setcolor

Hi, newbie question,

The default implementation of a wx.gauge is really nice but it only
has none (or one green) colors to choose from.
Is there an alternative implementation available that has exactly the
same look and feel as a wx.gauge? In the wxpython samples I see
another type of gauge/progression bar I do not really like. On the web
I found some implementation not looking very cool (e.g. without a
smooth blending from the core of the progression bar to the border).

TIA, samuel

class ProgressIndicator(wx.Panel):
    def __init__(self, parent, id=wx.ID_ANY,
                 gPos = (10,10), gSize = (200,100),counter=0,max=100):
        wx.Panel.__init__(self, parent, id)
        self.SetBackgroundColour("white")
        self.counter, self.max = counter, max
        # default id = -1 is used, range is 0 to 100, default is
horizontal style
        self.gauge1 = wx.Gauge(self, -1, self.max, gPos,gSize)
#BUT NO COLOR ATTRIBUTE???
        self.Hide()
    def update(self, amount=-1):
        if amount ==-1: self.counter += 1
        else: self.counter = amount
        self.gauge1.SetValue(self.counter)
        self.gauge1.Refresh()

Hi

(Sorry for my english : im french)

I'm a newbie too but according to me, you can't modify the look of the
gauge coz it's a native control which depends of your computer's
system.

If you really want to do your own gauge, that's not difficult to draw
it yourself in a wx.DC (with double buffer).

But maybe a wxPython expert will tell you something else.

Bye

Ivan

Hi,

I'm a newbie too but according to me, you can't modify the look of the
gauge coz it's a native control which depends of your computer's
system.

Maybe it is, but on my Win7 system I have never seem a gauge looking
like the wx.gauge, in none of 100+ applications.

If you really want to do your own gauge, that's not difficult to draw
it yourself in a wx.DC (with double buffer).

Oh, could you give me some hints them. I know, more or less, using a
doublebuffered DC. But first of all, I need to create the background
bar (grey on my system). This consist of an inner lighter grey and a
darker grey border. In between is an gradient from some pixels at the
border (size depending of the size of progressionbar I think). The
corners are a bit more complicated as they are more or less a mix in
between two gradients, diagonally overlapping.
Generating this on the fly sounds pretty complicated to me, but
offcourse I could put some small images of the cornergradient and the
top in a bitmapstring, do some rotating and expanding (with PIL) and
have the background ready.
Then I think I need to put the progression color on top, however it
doesn't look like a semi transparant (alpha channel) blending will do.
So more gradients to generate. Finally when the progressionbar reached
its end but isn't deactivated, I need the more light progression color
on top, scrolling from left to right.

Or am I missing something obvious?
TIA

I'm not in front of my Windows 7 box, but I'm pretty sure that the
gauge wraps the native control since I've seen it look "right" on my
Windows machine. Maybe your manifest file didn't get installed
correctly?

···

On Mar 2, 3:07 am, samuel en <samuel110...@gmail.com> wrote:

Hi,

> I'm a newbie too but according to me, you can't modify the look of the
> gauge coz it's a native control which depends of your computer's
> system.

Maybe it is, but on my Win7 system I have never seem a gauge looking
like the wx.gauge, in none of 100+ applications.

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org

I'm not in front of my Windows 7 box, but I'm pretty sure that the
gauge wraps the native control since I've seen it look "right" on my
Windows machine. Maybe your manifest file didn't get installed
correctly?

I am not sure what the manifest file is. Sorry.

The wx.gauge on my Windows 7 box looks absolutely beautiful (but
different from other applications gauges) and works like a charm.
Because it looks so good I want to use it, but want to be able to set
the front/progression color to a color suitable for the rest of the
application: e.g. when my app has a blue skin I want a blue bar, not a
green one.