TextEdit.CustomTextLineHeight Event
Allows you to specify the height of a line of text in Advanced Mode.
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.XtraEditors.v24.2.dll
Declaration
[DXCategory("Events")]
public event TextEditCustomTextLineHeightEventHandler CustomTextLineHeight
Event Data
The CustomTextLineHeight event's data class is DevExpress.XtraEditors.TextEditCustomTextLineHeightEventArgs.
Remarks
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);
}
}
}
See Also