protected override void OnPaint(PaintEventArgs e) { if (!Enabled) { PaintHelper.DrawDisabledFilter(e.Graphics, this); } }
protected override void OnPaint(PaintEventArgs e) { using (Pen borderPen = new Pen(BorderColor, BorderWidth)) e.Graphics.DrawRectangle(borderPen, GeometryHelper.ApplyPadding(ClientRectangle, new Padding(BorderWidth / 2))); DrawAndMeasureText(e.Graphics); if (caretVisible) { DrawCaret(e.Graphics); } if (!Enabled) { PaintHelper.DrawDisabledFilter(e.Graphics, this); } }
protected override void OnPaintBackground(PaintEventArgs e) { PaintHelper.FillWithParentBackground(e.Graphics, this); }