Highlight RadButton On Demand

5 posts, 1 answers
  1. Rabeeh
    Rabeeh  avatar
    62 posts
    Member since:
    Sep 2007

    Posted 18 Nov 2009 Link to this post

    Hi I would like to know how to Highlight a RadButton on demand ?
  2. Rabeeh
    Rabeeh  avatar
    62 posts
    Member since:
    Sep 2007

    Posted 18 Nov 2009 Link to this post

    I would like to get the same highlighting effect, as the one produced when the mouse passes over the RadButton...

    I want to highlight RadButton, on specified events...
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 23 Nov 2009 Link to this post

    Hi Rabeeh ,

    In order to put a RadButton in a 'mouseover' state, you should simply set the IsMouseOver property of the RadButton's FillPrimitive and BorderPrimitive to true:
    ((FillPrimitive)this.radButton1.ButtonElement.Children[0]).IsMouseOver = true;
    ((BorderPrimitive)this.radButton1.ButtonElement.Children[2]).IsMouseOver = true;

    I hope this helps.

    Sincerely yours,
    Nikolay
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Rabeeh
    Rabeeh  avatar
    62 posts
    Member since:
    Sep 2007

    Posted 24 Nov 2009 Link to this post

    Thank you for the reply,
     
    I tried the code you sent me, but it did not work, the button does not highlight..
  6. Answer
    Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 27 Nov 2009 Link to this post

    Hi Rabeeh ,

    I am attaching a sample project and a screenshot of what is the appearance of the first button when I apply the code from my previous response. Do you get the correct appearance on your side as well?

    Kind regards,

    Nikolay
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
UI for WinForms is Visual Studio 2017 Ready