The textbox and combo boxes render differently.When I add textboxes to a simple SF Maintenance form, they are correctly disabled until the user picks Edit. However, they do not appear disabled (greyed out). Any ideas? |
There were complaints about the default textbox disabled colors being too dark (even though they were the Windows standard). So a DisabledForeColor and DisableBackColor properties were added to the textboxes so this could be accounted for. So if you do not like the Disabled fore and background colors, you could subclass the SF TextBox and set these to your liking (versus changing each control).
FWIW, a combo box on the same form does look correct (grey when disabled, clear when enabled).
The only time (at the moment) that the we override the standard .NET rendering of the combo is when using multi-columns.
You can take another approach and not allow any of the controls to be disabled by setting the ManageReadonlyState to False on the BO. You can then handle the IsDIrtyChanged event on the BO so enable/disable the Save/Undo buttons. There are a number of ways that you can go about addressing this, but the textboxs are in fact disabled, but this is their default disabled color.