且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使Windows窗体控件只读?

更新时间:2023-12-06 09:18:28

对于一些典型的WinForms控件:

For some typical winforms controls:

http://jquiz.wordpress.com/2007/05/29/c-winforms-readonly-controls /

这也是一个很好的提示保存的外观:

This is also a good tip to preserve the appearance:

    Color clr = textBox1.BackColor;
    textBox1.ReadOnly = true;
    textBox1.BackColor = clr;