5 Answers, 1 is accepted
0
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.
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.
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
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.
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
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.
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.