Readonly TextBox that doesn't look funny
When you make a WinForm TextBox ReadOnly, it aquires a distinctive look because it changes the background. Users often want the appearance of the TextBox to stay the same, they just don't want it to be mutable. Here's a snippet to make a TextBox ReadOnly and not change it's appearance.
Dim saved As Color = Me.TextBox1.BackColor
Me.TextBox1.ReadOnly = True
Me.TextBox1.BackColor = saved
Comments
- Anonymous
April 28, 2008
PingBack from http://famousfunnymoviequoteblog.info/jaredpars-weblog-readonly-textbox-that-doesnt-look-funny/