Page 1 of 1

ProgressBar Front & Back Colors

Posted: Wed Apr 05, 2023 6:12 am
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?

Re: ProgressBar Front & Back Colors

Posted: Wed Apr 05, 2023 8:23 am
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)

Re: ProgressBar Front & Back Colors

Posted: Wed Apr 05, 2023 9:58 pm
by rozbud
Thank you dear Caronte3D,
IT WORKED!

I hope that PB Development Team, consider it as a bug in the Designer.
Best regards.

Re: ProgressBar Front & Back Colors

Posted: Wed Apr 05, 2023 10:04 pm
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.