How to change color of RadProgressBar Q1 2011

5 posts, 1 answers
  1. Joe Sugden
    Joe Sugden avatar
    52 posts
    Member since:
    Feb 2010

    Posted 06 Jun 2011 Link to this post

    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!
  2. Answer
    Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 09 Jun 2011 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Joe Sugden
    Joe Sugden avatar
    52 posts
    Member since:
    Feb 2010

    Posted 13 Jun 2011 Link to this post

    Worked like a charm once I reset ThemeName property for the control. Thank you!
  5. QuizzBox
    QuizzBox avatar
    46 posts
    Member since:
    Jan 2011

    Posted 16 Sep 2011 Link to this post

    does not work for me,
    the progress is blue at design time but bak to green at runtime :/
    i'm with Q2 - 2011 version
  6. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 21 Sep 2011 Link to this post

    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 >>

Back to Top
UI for WinForms is Visual Studio 2017 Ready