Enable Styling

4 posts, 0 answers
  1. Siam
    Siam avatar
    1 posts
    Member since:
    May 2008

    Posted 28 May 2008 Link to this post

    How to change the style of disable control ?
  2. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 30 May 2008 Link to this post

    Hi Siam,

    Thank you for the question.

    To change the disabled style, you have to implement your custom theme with added states for the necessary elements with the condition handling the case when RadElement.Enabled property is set to false. Then, all you have to do is to apply the theme and set the UseDefaultDisabledPaint property of the respective element to false. The style you defined for elements will be applied when the control has been disabled.

    I hope this helps. If you need additional assistance, do not hesitate to contact me again.

    Best wishes,
    Martin Vasilev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Reid McClanahan
    Reid McClanahan avatar
    3 posts
    Member since:
    Jun 2007

    Posted 24 Jun 2008 Link to this post

    what if I dont want to build a whole theme, but just get one element to hold a new background color after being clicked?  I have not created a theme, but have a default ribbon bar loaded.  I want to have a 'quick access toolbar item' to show a different color when it has been clicked to show that item being 'active' on my form.
  5. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 26 Jun 2008 Link to this post

    Hello Reid,

    There are two approaches that I can suggest for your scenario:
    1. Change the BackColors of normal RadButtons. However, this approach requires keeping track of the button state by holding a boolean variable.
    2. Using RadToggleButtons. They automatically toggle on/off when you click on them and you do not need to keep the boolean variable.

    You can also combine these two approaches - use RadToggleButtons for automatic on/off states and setting their BackColors according to your preference. I have attached a sample project to demonstrate the usage of RadButtons and RadToggleButtons.

    If you have additional questions, feel free to contact me.

    Sincerely yours,

    Nikolay
    the Telerik team


    Instantly find answers to your questions at the new Telerik Support Center
Back to Top