How to specify the Line back color in EditControl?
In WinForms EditControl, user can specify back color for particular line using its function named SetLineBackColor. The function contains the following arguments.
Line Number: It is helps to specify the line number, for which BackColor to be applied.
Full Line: It helps to specify whether the BackColor is applied for full line or just particular co-ordinates.
Format: It helps to specify the format of the background.
The following code example demonstrates the same.
C#
//To set the Line back color of the EditControl for (int lineNumber = 1; lineNumber <= this.editControl1.PhysicalLineCount; lineNumber++) { this.editControl1.SetLineBackColor(lineNumber, true, this.editControl1.RegisterBackColorFormat(this.colorUIControl1.SelectedColor, Color.Empty)); }
VB
'To set the Line back color of the EditControl For lineNumber As Integer = 1 To Me.editControl1.PhysicalLineCount Me.editControl1.SetLineBackColor(lineNumber, True, Me.editControl1.RegisterBackColorFormat(Me.colorUIControl1.SelectedColor, Color.Empty)) Next lineNumber
Figure 1: Before specifying the Line backcolor in EditControl.
Figure 2: After specifying the Line backcolor in EditControl.
Sample Links:
Conclusion
I hope you enjoyed learning about how to specify the Line back color in EditControl.
You can refer to our WinForms EditControl’s feature tour page to know about its other groundbreaking feature representations. You can also explore our WinForms EditControl documentation to understand how to present and manipulate data.
For current customers, you can check out our WinForms 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 Winforms EditControl and other WinForms components.
If you have any queries or require clarifications, please let us know in the comment section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!