There are plenty of articles addressing flicker in Windows Forms. The majority recommend setting DoubleBuffered = true
or setting a bunch of ControlStyle
flags. However, none of these help reduce a TextBox flickering.
Here are a couple of related questions:
To reproduce the issue, create a new WinForms project, add a TextBox
, enable multi-line, disable word-wrap, add a bunch of text, set Anchor
to Left+Right+Top+Bottom. Now run and resize. The text flickers. For text boxes inside a couple of nested TableLayoutPanel
s the flicker on resize is even worse.
Applying the solutions proposed in the above questions at best do not fix the flicker; if I get experimental and set the protected ControlStyle
on TextBox
I can break it completely (by enabling UserPaint
) but not eliminate the flicker.
So, is there any way at all to fix the flickering of the text in a TextBox?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…