Skip to content

Commit 8d9af62

Browse files
Update disable RichTextBox Renderer.
1 parent 68e7712 commit 8d9af62

File tree

1 file changed

+6
-3
lines changed
  • src/System.Windows.Forms/System/Windows/Forms/Controls/RichTextBox

1 file changed

+6
-3
lines changed

src/System.Windows.Forms/System/Windows/Forms/Controls/RichTextBox/RichTextBox.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3435,8 +3435,8 @@ protected override unsafe void WndProc(ref Message m)
34353435
base.WndProc(ref m);
34363436

34373437
// If the control is disabled, we don't want to let the RTF control
3438-
// paint anything else. We will paint the background and the text
3439-
// ourselves, so we don't want the RTF control to paint the background
3438+
// paint anything else. We will paint the background and the unformatted
3439+
// text ourselves, so we don't want the RTF control to paint the background
34403440
// and the text in the foreground color.
34413441
using Graphics g = Graphics.FromHwndInternal(Handle);
34423442

@@ -3450,7 +3450,10 @@ protected override unsafe void WndProc(ref Message m)
34503450
Font,
34513451
ClientRectangle,
34523452
SystemColors.GrayText,
3453-
TextFormatFlags.Left | TextFormatFlags.VerticalCenter);
3453+
TextFormatFlags.Left
3454+
| TextFormatFlags.Top
3455+
| TextFormatFlags.WordBreak,
3456+
| TextFormatFlags.EndEllipsis);
34543457

34553458
return;
34563459
}

0 commit comments

Comments
 (0)