﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Disabled textbox does not look disabled</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Thu, 24 Sep 2026 07:14:50 GMT</lastBuildDate><ttl>20</ttl><item><title>Disabled textbox does not look disabled</title><link>http://forum.strataframe.net/FindPost14294.aspx</link><description>When I add textboxes to a simple SF Maintenance form, they are correctly disabled until the user picks Edit.&amp;nbsp; However, they do not appear disabled (greyed out).&amp;nbsp; Any ideas?&lt;P&gt;FWIW, a combo box on the same form does look correct (grey when disabled, clear when enabled).&amp;nbsp; &lt;/P&gt;&lt;P&gt;Tia, &lt;/P&gt;&lt;P&gt;Larry</description><pubDate>Mon, 11 Feb 2008 13:29:27 GMT</pubDate><dc:creator>Larry Tucker</dc:creator></item><item><title>RE: Disabled textbox does not look disabled</title><link>http://forum.strataframe.net/FindPost14302.aspx</link><description>No problem...we are glad to help :)</description><pubDate>Mon, 11 Feb 2008 13:29:27 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Disabled textbox does not look disabled</title><link>http://forum.strataframe.net/FindPost14301.aspx</link><description>Trent,&lt;P&gt;Thanks for the quick and complete reply.&amp;nbsp; As a new SF user,&amp;nbsp; I appreciate you going beyond my basic question and offering some additional approaches to the issue which help broaden my understanding of the framework.&lt;/P&gt;&lt;P&gt;Larry</description><pubDate>Mon, 11 Feb 2008 13:24:27 GMT</pubDate><dc:creator>Larry Tucker</dc:creator></item><item><title>RE: Disabled textbox does not look disabled</title><link>http://forum.strataframe.net/FindPost14295.aspx</link><description>The textbox and combo boxes render differently.&lt;/P&gt;&lt;P&gt;[quote]&lt;TABLE cellSpacing=0 cellPadding=0 width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class=smalltxt vAlign=top&gt;&lt;SPAN id=ctl02_ctlTopic_ctlPanelBar_ctlTopicsRepeater_ctl04_lblFullMessage&gt;When I add textboxes to a simple SF Maintenance form, they are correctly disabled until the user picks Edit.&amp;nbsp; However, they do not appear disabled (greyed out).&amp;nbsp; Any ideas?&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;[/quote]&lt;/P&gt;&lt;P&gt;There were complaints about the default textbox disabled colors being too dark (even though they were the Windows standard).&amp;nbsp; So a DisabledForeColor and DisableBackColor properties were added to the textboxes so this could be accounted for.&amp;nbsp; 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).&lt;/P&gt;&lt;P&gt;[quote]FWIW, a combo box on the same form does look correct (grey when disabled, clear when enabled).&amp;nbsp; [/quote]&lt;/P&gt;&lt;P&gt;The only time (at the moment) that the we override the standard .NET rendering of the combo is when using multi-columns.&lt;/P&gt;&lt;P&gt;You can take another approach and not allow any of the controls to be disabled by setting the ManageReadonlyState to False on the BO.&amp;nbsp; You can then handle the IsDIrtyChanged event on the BO so enable/disable the Save/Undo buttons.&amp;nbsp; 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.</description><pubDate>Mon, 11 Feb 2008 11:41:42 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>