How to customize the cursor in the WinForms SyntaxEditor?
Customize cursor appearance
Please refer to the below code snippets that explain how to customize the Cursor in SyntaxEditor (EditControl).
C#
private Cursor currentCursor = Cursors.Default; this.editControl1.Cursor = this.currentCursor; private void menuItem_Click(object sender, System.EventArgs e) { MenuItem mitem = sender as MenuItem; if (mitem.Text == "AppStarting") this.currentCursor = Cursors.AppStarting; if (mitem.Text == "Arrow") this.currentCursor = Cursors.Arrow; if (mitem.Text == "Cross") this.currentCursor = Cursors.Cross; if (mitem.Text == "Default") this.currentCursor = Cursors.Default; if (mitem.Text == "Hand") this.currentCursor = Cursors.Hand; if (mitem.Text == "Help") this.currentCursor = Cursors.Help; if (mitem.Text == "HSplit") this.currentCursor = Cursors.HSplit; this.editControl1.Cursor = this.currentCursor; }
VB
Private currentCursor As Cursor = Cursors.Default Me.editControl1.Cursor = Me.currentCursor private void menuItem_Click(Object sender, System.EventArgs e) Dim mitem As MenuItem = TryCast(sender, MenuItem) If mitem.Text = "AppStarting" Then Me.currentCursor = Cursors.AppStarting End If If mitem.Text = "Arrow" Then Me.currentCursor = Cursors.Arrow End If If mitem.Text = "Cross" Then Me.currentCursor = Cursors.Cross End If If mitem.Text = "Default" Then Me.currentCursor = Cursors.Default End If If mitem.Text = "Hand" Then Me.currentCursor = Cursors.Hand End If If mitem.Text = "Help" Then Me.currentCursor = Cursors.Help End If If mitem.Text = "HSplit" Then Me.currentCursor = Cursors.HSplit End If Me.editControl1.Cursor = Me.currentCursor
Reference link: https://help.syncfusion.com/windowsforms/syntax-editor/appearance#customize-cursor-appearance
I hope you enjoyed learning about how to customize the cursor in the WinForms SyntaxEditor.
You can refer to our WinForms Syntax Editor feature
tour page to know about its other
groundbreaking feature representations and documentation, and
how to quickly get started for configuration specifications. You can also
explore our
WinForms Syntax Editor example to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!