This is a migrated thread and some comments may be shown as answers.

mouseover

2 Answers 94 Views
Panelbar (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Brandon
Top achievements
Rank 1
Brandon asked on 22 Sep 2008, 02:11 PM
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 Answers, 1 is accepted

Sort by
0
Brandon
Top achievements
Rank 1
answered on 24 Sep 2008, 02:14 PM
bump.

could really use an answer to question #2 please if anyone has any ideas?!
0
Accepted
Boyko Markov
Telerik team
answered on 25 Sep 2008, 01:15 PM
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.
Tags
Panelbar (obsolete as of Q2 2010)
Asked by
Brandon
Top achievements
Rank 1
Answers by
Brandon
Top achievements
Rank 1
Boyko Markov
Telerik team
Share this question
or