﻿<?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?)  » Any way to control format of combox when enabling/disabling?</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Wed, 09 Sep 2026 06:45:07 GMT</lastBuildDate><ttl>20</ttl><item><title>Any way to control format of combox when enabling/disabling?</title><link>http://forum.strataframe.net/FindPost12232.aspx</link><description>I'm trying to control the enabled/disabled state of a combobox, based on editing state. I know how/where to handle this (EditingStateChanged event), but when I disable my combo, it has a gray background.  I tried to instead use the BindingEditable property, but it did the same thing. Yet, bound SF combos have a white background and light light gray text.  What am I not doing/doing wrong?&lt;br&gt;
&lt;br&gt;
Thanks!</description><pubDate>Thu, 01 Nov 2007 09:22:51 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Any way to control format of combox when enabling/disabling?</title><link>http://forum.strataframe.net/FindPost12341.aspx</link><description>Yes, they are normally dark gray on light gray when disabled and they have been changed to gray on white (it actually is more readable...).&amp;nbsp; But there should be new properties on the controls for background/foreground disabled colors, so you should be able to changes those and get the effect you're looking for.</description><pubDate>Thu, 01 Nov 2007 09:22:51 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Any way to control format of combox when enabling/disabling?</title><link>http://forum.strataframe.net/FindPost12321.aspx</link><description>This seems to support that it will be hard to get an unbound SF combo to look the same as a bound SF combo.  &lt;br&gt;
&lt;br&gt;
My solution was to add a custom bindable field to the BO that just translates the value of the field to the enum I want.  I.e. I had a boolean field, but wanted to provide a drop down with yes/no in it.  I just made a custom field that translated the boolean to the enum on get and from the enum to boolean on set.  It works great.    &lt;br&gt;
&lt;br&gt;
Thanks for the clarification on how this works.&lt;br&gt;
&lt;br&gt;
One last question: you've stated that you did work to render the disabled controls in a more readable state. Is that done? Do we have that?  All my disabled controls are still light light gray on white when disabled.</description><pubDate>Wed, 31 Oct 2007 16:19:57 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Any way to control format of combox when enabling/disabling?</title><link>http://forum.strataframe.net/FindPost12307.aspx</link><description>If the control is not bound then we do not manage the enabled states.&amp;nbsp; When bound, however, we manage the state of a combo box differently than any other control.&amp;nbsp; The reason for this is that when a combo is a DropDown it renders differently in a disabled state then when a DropDownList.&amp;nbsp; Thus, when disabled, the control will always render as a DropDownList and we manage the state back and forth.</description><pubDate>Wed, 31 Oct 2007 11:27:57 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Any way to control format of combox when enabling/disabling?</title><link>http://forum.strataframe.net/FindPost12303.aspx</link><description>I'm going to have to defer to Trent on this one... I'll have him check it and let you know.</description><pubDate>Wed, 31 Oct 2007 11:07:20 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Any way to control format of combox when enabling/disabling?</title><link>http://forum.strataframe.net/FindPost12283.aspx</link><description>I'm using a SF combo. When it is bound it has light light gray text on a white background.  But when it isn't bound, it is black text on a gray background.  &lt;br&gt;
&lt;br&gt;
On a side note, how do you control that enabled appearance?  I haven't noticed any difference in its behavior.</description><pubDate>Tue, 30 Oct 2007 10:33:58 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Any way to control format of combox when enabling/disabling?</title><link>http://forum.strataframe.net/FindPost12270.aspx</link><description>Are you using an SF combo box or a regular combo box?&amp;nbsp; We override the OnPaint() of the SF combo box to draw the different colored background because people hate the way you cannot read disabled text.&amp;nbsp; So, if you're using the SF combo box, it should be doing that when you use the Enabled property, but if you're using the regular combo box, then it won't have that functionality.</description><pubDate>Tue, 30 Oct 2007 09:20:06 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>