mouseover

3 posts, 1 answers
  1. Brandon
    Brandon avatar
    16 posts
    Member since:
    Aug 2008

    Posted 22 Sep 2008 Link to this post

    Two questions.

    1) How do you set the mouseover color for the radpanelbargroupelements (default is orange)?

    2) I want to change the cursor to be the hand when mouseover is on the "title bars" of the radpanelbargroupelements, but when i put events on the mouseenter, mouseleave of the radpanelbargroupelements they are never fired.

    any help is greatly appreciated, thanks!

    -brandon
  2. Brandon
    Brandon avatar
    16 posts
    Member since:
    Aug 2008

    Posted 24 Sep 2008 Link to this post

    bump.

    could really use an answer to question #2 please if anyone has any ideas?!
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Answer
    Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 25 Sep 2008 Link to this post

    Hello Brandon,

    Here is some sample code for changing the cursor type. You can modify it a little bit to change the colors, too.
    To get mouse events you need to subscribe the the mouse events of the caption element of the PanelBar's group element. Then in the appropriate event handlers you need the put your logic for handling the cursor and the colors. The GetCaptionElement method returns an instance of the group's caption element.

    1.
           foreach (RadPanelBarGroupElement group in this.radPanelBar1.Items)
                {
                    group.GetCaptionElement().MouseLeave += new EventHandler(Form1_MouseLeave);
                    group.GetCaptionElement().MouseMove += new MouseEventHandler(Form1_MouseMove);
                }
            }
    2.
            void Form1_MouseMove(object sender, MouseEventArgs e)
            {
                Cursor.Current = Cursors.Hand;
            }

            void Form1_MouseLeave(object sender, EventArgs e)
            {
                Cursor.Current = Cursors.Arrow;
            }

    In case you would like to receive faster responses, please use the support ticketing system. It assigns guaranteed response times to all tickets according to your license and are reviewed with greater priority. The Forums get a default of 72 hour guaranteed response times.

    If you have any additional questions please write me back.
     

    All the best,
    Boyko Markov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top