This is a migrated thread and some comments may be shown as answers.

How to change color of RadProgressBar Q1 2011

4 Answers 259 Views
ProgressBar
This is a migrated thread and some comments may be shown as answers.
Joe Sugden
Top achievements
Rank 1
Joe Sugden asked on 06 Jun 2011, 10:57 PM
I have a dialog box with a RadWaitingBar and a RadProgressBar. Before upgrading to Telerik Q1 2011, both of my bars were blue. 

After upgrading, my RadProgressBar is now green as the default of the Office2010Silver theme (see attached). How do I change it back to blue?

Looking at my old designer code, it was set to blue using these lines, which now error out:

CType(Me.barProgress.GetChildAt(0).GetChildAt(1), Telerik.WinControls.Primitives.ProgressBarPrimitive).BackColor2 = System.Drawing.Color.FromArgb(CType(CType(153, Byte), Integer), CType(CType(225, Byte), Integer), CType(CType(238, Byte), Integer))
CType(Me.barProgress.GetChildAt(0).GetChildAt(1), Telerik.WinControls.Primitives.ProgressBarPrimitive).BackColor3 = System.Drawing.Color.FromArgb(CType(CType(4, Byte), Integer), CType(CType(187, Byte), Integer), CType(CType(208, Byte), Integer))
CType(Me.barProgress.GetChildAt(0).GetChildAt(1), Telerik.WinControls.Primitives.ProgressBarPrimitive).BackColor4 = System.Drawing.Color.FromArgb(CType(CType(4, Byte), Integer), CType(CType(159, Byte), Integer), CType(CType(208, Byte), Integer))
CType(Me.barProgress.GetChildAt(0).GetChildAt(1), Telerik.WinControls.Primitives.ProgressBarPrimitive).BackColor = System.Drawing.Color.FromArgb(CType(CType(153, Byte), Integer), CType(CType(219, Byte), Integer), CType(CType(238, Byte), Integer))

Please advise. Thank you!

4 Answers, 1 is accepted

Sort by
0
Accepted
Ivan Petrov
Telerik team
answered on 09 Jun 2011, 09:10 AM
Hi Joe,

Thank you for writing and for the attached code.

We changed the inner structure of the RadPropgressBar in Q1 2011 as we are trying constantly to improve our controls. You can change the code you have sent me with the following:

Me.RadProgressBar1.ProgressBarElement.IndicatorElement1.BackColor = Color.FromArgb(153, 225, 238)
Me.RadProgressBar1.ProgressBarElement.IndicatorElement1.BackColor2 = Color.FromArgb(4, 187, 208)
Me.RadProgressBar1.ProgressBarElement.IndicatorElement1.BackColor3 = Color.FromArgb(4, 159, 208)
Me.RadProgressBar1.ProgressBarElement.IndicatorElement1.BackColor4 = Color.FromArgb(153, 219, 238)

This will make the progress indicator have the blue colors you want.

I hope this will help. If you have further questions, I would be glad to help.

All the best,
Ivan Petrov
the Telerik team
Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
0
Joe Sugden
Top achievements
Rank 1
answered on 13 Jun 2011, 08:04 PM
Worked like a charm once I reset ThemeName property for the control. Thank you!
0
OD
Top achievements
Rank 1
answered on 16 Sep 2011, 03:01 PM
does not work for me,
the progress is blue at design time but bak to green at runtime :/
i'm with Q2 - 2011 version
0
Ivan Petrov
Telerik team
answered on 21 Sep 2011, 09:12 AM
Hello Nermond,

Thank you for writing.

I am not able to reproduce the issue with the version of the controls you are using. I would kindly ask you to send me a sample project where you reproduce the issue so I can thoroughly investigate it. Please note that you have to open a new support ticket in order to be able to attach your files.

I am looking forward to your reply.

Best wishes,
Ivan Petrov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
ProgressBar
Asked by
Joe Sugden
Top achievements
Rank 1
Answers by
Ivan Petrov
Telerik team
Joe Sugden
Top achievements
Rank 1
OD
Top achievements
Rank 1
Share this question
or