Progressbaroverlay back & Fore color won't change

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 11 months and 2 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
DarusDP
Posts: 43
Last visit: Fri Feb 09, 2024 1:02 pm
Been upvoted: 1 time

Progressbaroverlay back & Fore color won't change

Post by DarusDP »

Product: PowerShell Studio 2023 (64 Bit)
Build: v5.8.217
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.19044.0

In March 2020 I reported this and you replied (see below) that it is filed as a bug report. I still have the issue. Has the bug been worked?

Both in Design mode and running the BackColor and ForColor properties of ProgressBarOverlay have no affect.
Here is line of code: $progressbaroverlay1.BackColor = 'Beige'
The color stays at some default of gray

Post by brittneyr » Tue Mar 31, 2020 10:00 am
Thank you for reporting this to us. I have been able to reproduce this issue and have filed a bug report for the team. When the issue is fixed, it will be listed in the logs.
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 9:46 am
Answers: 39
Been upvoted: 30 times

Re: Progressbaroverlay back & Fore color won't change

Post by brittneyr »

Upon further investigation of this behavior, the Progressbar control (and by extension, the ProgressBarOverlay control) does not directly support setting the backcolor and forcolor. This is the .NET behavior, not our doing or something we can fix in the .NET ProgressBar control.

There were updates to the ProgressBarOverlay control in 2020 for PowerShell 7 support which is what ended up taking focus away from this specific functionality.
This functionality might be able to be added to the ProgressBarOverlay control. I'll talk to the development team and let you know.
Brittney
SAPIEN Technologies, Inc.
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 9:46 am
Answers: 39
Been upvoted: 30 times

Re: Progressbaroverlay back & Fore color won't change

Post by brittneyr »

In service build 5.8.220, a new setting was added to the ProgressBarOverlay control called SetProgressBarColors. When set to true, it uses the ForeColor and BackColor properties to color the progress bar. Please let me know if you experience any issues with this setting.
Brittney
SAPIEN Technologies, Inc.
DarusDP
Posts: 43
Last visit: Fri Feb 09, 2024 1:02 pm
Been upvoted: 1 time

Re: Progressbaroverlay back & Fore color won't change

Post by DarusDP »

Product: PowerShell Studio 2023 (64 Bit)
Build: v5.8.220
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.19044.0

I'm at latest version that says it fixes this issue. The ForeColor works but the BackColor doesn't seem to work. I'm setting the value in the Form properties and not in the script code. I tested setting in script and same results - it doesn't change to what I set it to.
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 9:46 am
Answers: 39
Been upvoted: 30 times

Re: Progressbaroverlay back & Fore color won't change

Post by brittneyr »

Do you have the new property SetProgressBarColors set to true?
Is this an old or new psf file?
Brittney
SAPIEN Technologies, Inc.
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 9:46 am
Answers: 39
Been upvoted: 30 times

Re: Progressbaroverlay back & Fore color won't change

Post by brittneyr »

The ForeColor property should be used to color the text overlay and the BackColor should be used to color the progress bar. This does not change the default color of the background of the control itself. When SetProgressBarColors is set to true, it should look something like this:
ProgressBarColors.png
ProgressBarColors.png (5.27 KiB) Viewed 3107 times
Brittney
SAPIEN Technologies, Inc.
This topic is 11 months and 2 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.