Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Panels, Labels, GroupBox > Change border color of GroupBox header back to default

Answered Change border color of GroupBox header back to default

Feed from this thread
  • Posted on Feb 22, 2011 (permalink)

    Hello,
    I hope that someone can help me with this little issue.
    I would like to change the color of a GroupBox Header back to the applied theme's default color.

    I prgrammatically changed the border color with the following code to red to show an invalid user input (a kind of validation).

    DirectCast
    (.rgrb_CountryOfOrigin.GroupBoxElement.Children(1).Children(1), BorderPrimitive).ForeColor = Color.Red 

    When the input is corrected the color should change back to its default value. Actually I use the desert theme.
    Is there a possibillity to get a default color value for the assigned theme for the chosen control (eg GroupBox)?
    If not, where can I find the theme values like colors etc?
    Any help is appreciated.
    Cheers Roberto
    Attached files

    Reply

  • Posted on Feb 22, 2011 (permalink)

    Hello Roberto,

    You can reset any values in the Telerik Presentation Framework by calling the ResetValue method and passing the property that you want to reset. In this case.

    DirectCast(Me.RadGroupBox1.GroupBoxElement.Children(1).Children(1), BorderPrimitive).ResetValue(LightVisualElement.ForeColorProperty, Telerik.WinControls.ValueResetFlags.Local)

    Hope you find that helpful
    Richard

    Reply

  • Posted on Feb 23, 2011 (permalink)

    Cool!
    Thank you Richard. That is what I need.
    Roberto

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Panels, Labels, GroupBox > Change border color of GroupBox header back to default
Related resources for "Change border color of GroupBox header back to default"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]