ProgressBar Front & Back Colors

You need some new stunning features ? Tell us here.
rozbud
New User
New User
Posts: 6
Joined: Fri Mar 10, 2023 4:05 pm

ProgressBar Front & Back Colors

Post by rozbud »

Even after changing the "ProgressBar Front & Back Colors" in the Form Designer, PB still show the "ProgressBar" in its default colors.
Any help?
User avatar
Caronte3D
Addict
Addict
Posts: 1361
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: ProgressBar Front & Back Colors

Post by Caronte3D »

If you are on Windows, you can use:

Code: Select all

  ProgressBarLC = ProgressBarGadget(#PB_Any, 99, 31, 340, 12, 0, 0, #PB_ProgressBar_Smooth)
  CompilerIf #PB_Compiler_OS = #PB_OS_Windows : SetWindowTheme_(GadgetID(ProgressBarLC), @"", @"") : CompilerEndIf
  SetGadgetColor(ProgressBarLC, #PB_Gadget_FrontColor, #Blue)
  SetGadgetColor(ProgressBarLC, #PB_Gadget_BackColor, #Red)
rozbud
New User
New User
Posts: 6
Joined: Fri Mar 10, 2023 4:05 pm

Re: ProgressBar Front & Back Colors

Post by rozbud »

Thank you dear Caronte3D,
IT WORKED!

I hope that PB Development Team, consider it as a bug in the Designer.
Best regards.
BarryG
Addict
Addict
Posts: 4173
Joined: Thu Apr 18, 2019 8:17 am

Re: ProgressBar Front & Back Colors

Post by BarryG »

It's not a bug because the manual specifically says coloring has no effect when XP skins (ie. modern theme) is enabled. The manual could use some re-wording to remove "XP skins" and replace it with "modern theme" instead, though.
Post Reply