radGroupBox Header text color

2 posts, 0 answers
  1. Steven Randlett
    Steven Randlett avatar
    7 posts
    Member since:
    Sep 2009

    Posted 06 May 2011 Link to this post

    I am a bit confused here.  What I want to do is change the color of the text in the header of a group box.  Here's what I have figured out so far:




    RE As RadElement = DirectCast(Me.rgbPharmacyInformation.RootElement.Children(0).Children(1).
    The zeroth child of the root element is the RadGroupBoxElement.
    The First child of the RadGroupBoxElement is the GroupBoxHeader element.
    The second child of the GroupBoxHesder elelemnt is the ImageAndTextLayoutPanel element.
    The first child of the ImageAndTextLayoutPanel element is text. 

    Looking at the property inspector in VS2010, I see properties for this element and the property I would like to change is the Fioreground color.  But what do I cast the "text" element as (In the above code, the "text" can be successfully cast to a RadElement)?  How can I get to this property?   

    Anybody's assistance would be appreciated!  Thank you for your time!


  2. Stefan
    Stefan avatar
    2906 posts

    Posted 10 May 2011 Link to this post

    Hi Steven,

    Thank you for writing.

    You can change the color of the header text in RadGroupBox by modifying the ForeColor property of the Header element. Here is how you can access it:
    radGroupBox1.GroupBoxElement.Header.ForeColor = Color.Red;

    I hope the provided information addresses your question. Should you have any other questions, do not hesitate to contact us.
    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.
Back to Top