windowsforms-devexpress-dot-xtraeditors-dot-textedit-3527b8bc.md
Allows you to specify the height of a line of text in Advanced Mode.
Namespace : DevExpress.XtraEditors
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DXCategory("Events")]
public event TextEditCustomTextLineHeightEventHandler CustomTextLineHeight
<DXCategory("Events")>
Public Event CustomTextLineHeight As TextEditCustomTextLineHeightEventHandler
The CustomTextLineHeight event's data class is DevExpress.XtraEditors.TextEditCustomTextLineHeightEventArgs.
The following example increases the text line height by 2 pixels:
using DevExpress.XtraEditors;
namespace DXApplication {
public partial class Form1 : XtraForm {
int padding = 1;
public Form1() {
InitializeComponent();
textEdit1.Properties.UseAdvancedMode = DevExpress.Utils.DefaultBoolean.True;
textEdit1.CustomTextLineHeight += TextEdit1_CustomTextLineHeight;
}
private void TextEdit1_CustomTextLineHeight(object sender, TextEditCustomTextLineHeightEventArgs e) {
e.Height = e.Height + 2 * ScaleDPI.ScaleVertical(padding);
}
}
}
Imports DevExpress.XtraEditors
Namespace DXApplication
Partial Public Class Form1
Inherits XtraForm
Private padding As Integer = 1
Public Sub New()
InitializeComponent()
textEdit1.Properties.UseAdvancedMode = DevExpress.Utils.DefaultBoolean.True
AddHandler textEdit1.CustomTextLineHeight, AddressOf TextEdit1_CustomTextLineHeight
End Sub
Private Sub TextEdit1_CustomTextLineHeight(ByVal sender As Object, ByVal e As TextEditCustomTextLineHeightEventArgs)
e.Height = e.Height + 2 * ScaleDPI.ScaleVertical(padding)
End Sub
End Class
End Namespace
See Also