Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
265
UltraProgressBar in UltraWinGrid - Setting fill color
posted

Ok. I'm strugling with another problem. I'm trying to set the color of the filled percentage to a custom color. But whatever I try, it doesn't work. Found some examples on the internet, but they just won't work for me.

I've added an UltraProgressBar on the UserControl, and leave it like that.

Then in code, after the InitialiseComponents() I'm doing this

// Set the appearance of the status bar control

            // to use a gradient.

            ultraProgressBar2.Appearance.BackColor = Color.Gray;

            ultraProgressBar2.Appearance.BackColor2 = Color.White;

            ultraProgressBar2.Appearance.BackGradientStyle = GradientStyle.HorizontalBump;

            ultraProgressBar2.Appearance.ForeColor = Color.Red;

            // Set the appearance for the 'fill' area of the

            // status bar control to use a different gradient.

            ultraProgressBar2.FillAppearance.BackColor = Color.Blue;

            ultraProgressBar2.FillAppearance.BackColor2 = Color.White;

            ultraProgressBar2.FillAppearance.BackGradientStyle = GradientStyle.HorizontalBump;

            ultraProgressBar2.FillAppearance.ForeColor = Color.Red;

            // Set the border style for the control

            ultraProgressBar2.BorderStyle = UIElementBorderStyle.Etched;

            ultraProgressBar2.Minimum = 0;

            ultraProgressBar2.Maximum = 100;

            ultraProgressBar2.Value = 50;

But the filled part color is still the default one, a green color. Help please !