Backcolor of Disabled RadPanel

2 posts, 0 answers
  1. Pavel Trnka
    Pavel Trnka avatar
    7 posts
    Member since:
    Aug 2012

    Posted 06 May 2010 Link to this post

    Hi there,

    very simple question, but i can't figure this out - where can I change the backcolor of RadPanel which is disabled? We are using the latest version of RadWinforms.

    Thx so much

  2. Nikolay
    Nikolay avatar
    1805 posts

    Posted 11 May 2010 Link to this post

    Hello Pavel Trnka,

    In order to set the color of RadPanel when it is disabled, you need to set two properties:
    1. The BackColor property to an appropriate value according to the Enabled state.
    2. The UseDefaultDisabledPaint property should be set to false.

    Please consider the following sample code snippet:

    public Form1() 
        this.radPanel1.RootElement.UseDefaultDisabledPaint = false
        this.radPanel1.EnabledChanged += new EventHandler(radPanel1_EnabledChanged); 
    void radPanel1_EnabledChanged(object sender, EventArgs e) 
        if (this.radPanel1.Enabled) 
            this.radPanel1.BackColor = Color.Transparent; 
            this.radPanel1.BackColor = Color.Red; 

    Generally, it is not necessary to set the UseDefaultDisabledPaint to false in this case the colors of the FillPrimitive contained in the RadPanel are Transparent. However, if the FillPrimitive of the RadPanel has a color, this property should be set, otherwise, you will get gray colors for the this primitive.

    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top