Progressbarcolor ...how to change it?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
olllllliii
Pro Scripter
Posts: 60
Joined: Tue Dec 22, 2009 9:51 am
Location: Mannheim ( Germany )
Contact:

Progressbarcolor ...how to change it?

Post by olllllliii » Wed Feb 27, 2013 9:05 am

Hello i tryed to change the Progressbarcolor....
so i made a Dialog with progressbars...but the Progressbar is always
green...

Code: Select all


Let>ColorNr=0
  Label>MDL
  SetDialogProperty>Dialog1,ProgressBar1,Position,100
  SetDialogProperty>Dialog1,ProgressBar1,BackgroundColor,ColorNr
  SetDialogProperty>Dialog1,ProgressBar1,Barcolor,ColorNr
  Add>ColorNr,10
    IF>ColorNr>100000
        Goto>weiterfuellen
    ENDIF
  Goto>MDL
  Label>weiterfuellen

things like BarColor = clFuchsia in Dialogmenue shows always green
barcolor
Oliver Hilger Mannheim
alias Olllllliii

User avatar
Marcus Tettmar
Site Admin
Posts: 7393
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Feb 27, 2013 12:00 pm

The colour of progress bars is dictated by the user's Window theme, same as the colour of buttons and window backgrounds and so on. You should not change them - the user has decided which theme he/she wants. And Windows should obey.

The BarColor property doesn't do anything unless the application is set to ignore runtime themes. Macro Scheduler and the compiler do not ignore themes and at present there is no way to tell it to ignore themes and I have no intention of changing that. As this is something that must be done when Macro Scheduler and the MacroScript compiler are themselves compiled there is no way to make this an option for you at runtime anyway.

Anticipating the next question "why is BarColor" there at all - the answer is because these properties are inherited from the underlying visual framework (The Delphi VCL).
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

olllllliii
Pro Scripter
Posts: 60
Joined: Tue Dec 22, 2009 9:51 am
Location: Mannheim ( Germany )
Contact:

Post by olllllliii » Wed Feb 27, 2013 1:40 pm

Thanks Marcus,

that means for me I need to find another graphic solution
to produce yellow, green and red progressbars.
I thought the windows would at Aero could do. Now I'm smarter.

But i am not unhappy to do that ...

:-)

Regards
Oliver Hilger
Oliver Hilger Mannheim
alias Olllllliii

User avatar
JRL
Automation Wizard
Posts: 3524
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Wed Feb 27, 2013 3:04 pm

I posted a sample that uses Microsoft's Rectangle API to draw a progress bar of any color you choose HERE.

User avatar
Grovkillen
Automation Wizard
Posts: 1128
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Post by Grovkillen » Wed Feb 27, 2013 3:34 pm

I also made a somewhat all right solution for this as well. You find it here>>
Let>ME=%Script%

Running: 15.0.27
version history

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts