I have a StatusStrip object at the bottom of my form with a ToolStripStatusLabel object added to it. I want to change the type of mouse cursor that is displayed when one hovers over it.
How can I achieve this?
I have a StatusStrip object at the bottom of my form with a ToolStripStatusLabel object added to it. I want to change the type of mouse cursor that is displayed when one hovers over it.
How can I achieve this?
On
As an alternative, you can host a Label in ToolStripControlHost and add it to StatusStrip. This way you can set all Label properties including Cursor. It will act like other standard items.
var item = new ToolStripControlHost(new Label {Text= "Some Text", Cursor= Cursors.Hand});
this.statusStrip1.Items.Add(item);
The
ToolStripStatusLabelobject does not have aCursorproperty. In order to change the displayed cursor you must set theStatusStrip.Cursorproperty at run-time.Use the label's MouseEnter and MouseLeave event to change the StatusStrip.Cursor property.