I am sorry to sort of reposting my question, plz don’t be offended, but I really like to finished my first custom wxWidget, so I need help from the experts here.
Attached is a working example of a wxGauge for windows (I think it is really cool), with the differences that it can progress from left to right, but also reverse, from top to bottom (and reverse), and that you can choose any number of background or foreground colors, thus including multi gradients.
It works like a charm and it is very fast, but my big question is: how can I implement the “light” effect of the original wxGauge going from left to right when the gauge isn’t updated fast enough. By “light” effect I mean, when the gauge isn’t growing for a few secs and you will see a lighter green color bar (approx 50 pix wide) moving from the left to the right, restarting from the left to the right, until the gauge grows.
I tried to implement this by putting on top a lighter color when the gauge was called with the same value, but the original one has this “light” effect also when the app is running in the background (and therefore the methods aren’t called actively). So there must be a thread or something going which keeps running. Please give me some guidance.
Thanks Samuel,
BTW: please criticize the attached code. I am proud of this gauge, but I am a newbie at Python and really like to learn to improve my skills.
A timer would work well for this. Each time you get an event from that timer just redraw with the glimmer effect shifted to the next position.
···
On 4/2/10 6:58 AM, samuel samuel wrote:
Hi,
I am sorry to sort of reposting my question, plz don't be offended, but
I really like to finished my first custom wxWidget, so I need help from
the experts here.
Attached is a working example of a wxGauge for windows (I think it is
really cool), with the differences that it can progress from left to
right, but also reverse, from top to bottom (and reverse), and that you
can choose any number of background or foreground colors, thus including
multi gradients.
It works like a charm and it is very fast, but my big question is: how
can I implement the "light" effect of the original wxGauge going from
left to right when the gauge isn't updated fast enough. By "light"
effect I mean, when the gauge isn't growing for a few secs and you will
see a lighter green color bar (approx 50 pix wide) moving from the left
to the right, restarting from the left to the right, until the gauge grows.
I tried to implement this by putting on top a lighter color when the
gauge was called with the same value, but the original one has this
"light" effect also when the app is running in the background (and
therefore the methods aren't called actively). So there must be a thread
or something going which keeps running. Please give me some guidance.