Problem with progress bar fill

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

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 10 years and 5 months 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.
Locked
User avatar
PNutts
Posts: 22
Last visit: Wed Feb 28, 2024 9:11 pm
Has voted: 2 times

Problem with progress bar fill

Post by PNutts »

When I step a progress bar, the fill never goes more than 75% from left to right even if I've reached the Maximum value. Style is Continuous using default values (Maximum = 100 & Step = 10).

I tried a ProgressBarOverlay and when it displayed 100% the fill was also only about 75%. I resized the control and it had no effect.

Should progress bars be 100% filled when the Maxiumum value is reached or passed? If so, any thoughts on why mine aren't? Windows 7 x64, PS 2, PowerShell Studio 3.1.24.

Thank you.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Problem with progress bar fill

Post by davidc »

Can you post the pff file?

David
David
SAPIEN Technologies, Inc.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Problem with progress bar fill

Post by jvierra »

It has always worked for me. I suspect you are setting the value (stepping) at the wrong time.
User avatar
PNutts
Posts: 22
Last visit: Wed Feb 28, 2024 9:11 pm
Has voted: 2 times

Re: Problem with progress bar fill

Post by PNutts »

I suspect I'm setting the value at the correct time.

I prefer to use Marquee style but when I make it visible the animation doesn't show (just a gray bar). Also, intellisense for Exchange cmdlets isn't working for me and a co-worker.

Disregard the question. I'll limp along until I have time to figure it all out.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Problem with progress bar fill

Post by jvierra »

It is not possible to answer your question without knowing how you are setting up the code and how you are incrementing the ProgressBar control. Anything posted would just be a wild guess.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Problem with progress bar fill

Post by jvierra »

PNutts wrote:I prefer to use Marquee style but when I make it visible the animation doesn't show (just a gray bar).
Start new form. Pace Pbar and set to marquee, Run form. It will show flashing marquee by default. If it doesn't it is possible that you are missing updates to the framework,
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Problem with progress bar fill

Post by jvierra »

I just remembered - Marquee only works in XP. It I snot available in Vista and later so if you are not on XP you will need to use other settings.

I seldom use Marquee even on XP. Sorry I didn't remember.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Problem with progress bar fill

Post by jvierra »

On Windows 7 this increments a default PBar continuously on a button click
PowerShell Code
Double-click the code block to select all.
$buttonRunPbar_Click={
        1..100 |%{$progressbar1.Value+=1}
}
This topic is 10 years and 5 months 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.
Locked