Disabled textbox does not look disabled


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
No problem...we are glad to help Smile
Larry Tucker
Larry Tucker
StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)
Group: StrataFrame Users
Posts: 69, Visits: 308
Trent,

Thanks for the quick and complete reply.  As a new SF user,  I appreciate you going beyond my basic question and offering some additional approaches to the issue which help broaden my understanding of the framework.

Larry

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
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.

Larry Tucker
Larry Tucker
StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)StrataFrame User (139 reputation)
Group: StrataFrame Users
Posts: 69, Visits: 308
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?

FWIW, a combo box on the same form does look correct (grey when disabled, clear when enabled). 

Tia,

Larry

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search