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

Cursor on RadLabelElement

5 Answers 147 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.
Erik
Top achievements
Rank 1
Erik asked on 12 Aug 2008, 08:55 AM
Hi telerik,

In RadPanelBar, I added dynamically RadLabelElement. Try to set the cursor but i couldnt do it.

How do i set the cursor?

Thanks

5 Answers, 1 is accepted

Sort by
0
Boyko Markov
Telerik team
answered on 13 Aug 2008, 01:53 PM
Hi Erik,

Thank you about contacting me.

There is a class named Cursor. This class has a property named Current and using this property you can change the cursor. Here is a sample code showing how to change a cursor:

Cursor.Current = Cursors.Hand;


I hope I got you correctly, however if you have more questions please don't hesitate to write me back.

Greetings,
Boyko Markov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Erik
Top achievements
Rank 1
answered on 13 Aug 2008, 02:01 PM
Thanks for the reply.

In radLabel, we can set RadLabel.cursor=cursor.hand
but not in RadLabelElement.

How do i set cursor for RadLabelElement? Thanks so much for your help.
0
Accepted
Boyko Markov
Telerik team
answered on 13 Aug 2008, 02:50 PM
Hello Erik,

Here is some code which you can use:

1. Subscribe to the MouseEnter and MouseLeave events of RadLabelElement

       this.radLabelElement1.MouseEnter += new EventHandler(radLabelElement1_MouseEnter);
       this.radLabelElement1.MouseLeave += new EventHandler(radLabelElement1_MouseLeave);

 
2. In the event handlers set the Cursor property.
  void radLabelElement1_MouseLeave(object sender, EventArgs e)
        {
            this.radLabelElement1.ElementTree.Control.Cursor = Cursors.Arrow;
        }

        void radLabelElement1_MouseEnter(object sender, EventArgs e)
        {
            this.radLabelElement1.ElementTree.Control.Cursor = Cursors.Hand;
        }

Note that you can access the parent control of every RadElement when the Visual tree is build.

I'll be glad to help if you have other questions.


Sincerely yours,
Boyko Markov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Erik
Top achievements
Rank 1
answered on 14 Aug 2008, 01:35 AM
Thanks for the answer. It's solved the problem.
0
Boyko Markov
Telerik team
answered on 14 Aug 2008, 10:52 AM
Hi Erik,

I'm glad to see that everything works fine now.
Do not hesitate to write me back if something else pops up.

Best wishes,
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
Erik
Top achievements
Rank 1
Answers by
Boyko Markov
Telerik team
Erik
Top achievements
Rank 1
Share this question
or