Leon Brambrick has a recent post talking about how people make readonly fields less readable.

He’s right – but he’s missed something too.

Very few of the Windows.Forms controls support a true readonly mode – the TextBox is the only common one. Other controls either don’t support it (Combobox) or require horrible tweaks (turning AutoCheck false on a CheckBox).

This results in many developers making their controls disabled instead of read only.

Trouble is, the semantics are different.

“Disabled” means “This isn’t relevant”.

“Readonly” means “You can’t change this”.

The distinction is important.

Fortunately, with WPF, most of the controls support a true Readonly mode that remains readable. In my book, that’s worth any four demos involving 3D form rendering.

Comments

blog comments powered by Disqus
Next Post
Swiss SRP  28 Jan 2009
Prior Post
New Year, New Look  24 Jan 2009
Related Posts
Using Constructors  27 Feb 2023
An Inconvenient API  18 Feb 2023
Method Archetypes  11 Sep 2022
A bash puzzle, solved  02 Jul 2022
A bash puzzle  25 Jun 2022
Improve your troubleshooting by aggregating errors  11 Jun 2022
Improve your troubleshooting by wrapping errors  28 May 2022
Keep your promises  14 May 2022
When are you done?  18 Apr 2022
Fixing GitHub Authentication  28 Nov 2021
Archives
January 2009
2009