SfComboBox: cannot change DisabledForeColor

Hi,

I need to change the colors of SfComboBox in disabled state.

change of DisabledBackColor works as expected.

but DisabledForeColor is not changing the color of the font. It stays in a greyish color.


example:

sfcombobox1.Enabled = False
sfcombobox1.Style.EditorStyle.DisabledBackColor = Color.White
sfcombobox1.Style.EditorStyle.DisabledForeColor = Color.Black


Regards
Dennis



11 Replies

EM Elakkiya Muthukumarasamy Syncfusion Team December 6, 2021 01:02 PM UTC

Hi Dennis, 

Greetings from Syncfusion. 

We have checked your query and we understand that when changing the DisabledForeColor of SFComboBox not working properly. But we can able to set the DisabledForeColor at our end .Please refer the sample for the same. 


Output: 

 

Please try it with the above solution and let us know if you need any further assistance on this 

Regards, 
Elakkiya 



DN Dennis Neuhaeuser December 6, 2021 01:18 PM UTC

Hi,


I am using VB.net instead of C#.


When using DropDownStyle = DropDownList I understand that one needs to use

ReadOnlyEditorStyle. EditorStyle is doing nothing with the colors in this case.


so this is working:


SfComboBox1.DropDownStyle = Syncfusion.WinForms.ListView.Enums.DropDownStyle.DropDownList
SfComboBox1.Enabled = False
SfComboBox1.Style.ReadOnlyEditorStyle.DisabledBackColor = Color.Blue
SfComboBox1.Style.ReadOnlyEditorStyle.DisabledForeColor = Color.White



But I rather want DropDownStyle = DropDown.

So this example is changing the Background but not the Foreground color:


SfComboBox1.DropDownStyle = Syncfusion.WinForms.ListView.Enums.DropDownStyle.DropDown
SfComboBox1.Enabled = False
SfComboBox1.Style.EditorStyle.DisabledBackColor = Color.Yellow
SfComboBox1.Style.EditorStyle.DisabledForeColor = Color.Red



Where is the mistake?


Regards

Dennis




EM Elakkiya Muthukumarasamy Syncfusion Team December 7, 2021 04:30 PM UTC

Hi Dennis, 
  
Thanks for your update.  
  
We have confirmed the reported scenario “DisableForeColor not applied properly while using DropDownStyle is DropDown in SFComboBox” is a defect and logged a report for this. We’ll provide the patch file for the reported issue on December 28th , 2021. We appreciate your patience until then. 
 
Please follow the below feedback link for further details 
 
Please let us know if you need any further assistance.    
 
Regards, 
Elakkiya 



TB Thirupathi Bala Krishnan Syncfusion Team December 23, 2021 03:50 PM UTC

Hi Dennis,

We fixed the reported issue “DisableForeColor not applied properly while using DropDownStyle is DropDown in SFComboBox” on our end. The code changes will be included in our upcoming weekly NuGet release which is scheduled for December 28th, 2021. Could you please confirm your exact product version if you want the patch file for one of our prior versions? We'll integrate the code changes based on your confirmation.

Regards,
Thirupathi B.


TB Thirupathi Bala Krishnan Syncfusion Team December 28, 2021 11:38 AM UTC

Hi Dennis, 

We have fixed the reported issue but we need to confirm the possible automations on our end. As a result, we won't be able to include the code changes in the current weekly nuget release. The code changes will be included in our upcoming weekly nuget release which is scheduled for January 4, 2022. We’ll let you know once the changes has been published in nuget.org. We appreciate your patience until then.  

Note: If you want the patch in any of our most recent versions, please specify the exact syncfusion product version, and we will merge the code changes into your version. 

Regards,
Thirupathi B. 



TB Thirupathi Bala Krishnan Syncfusion Team January 4, 2022 01:38 PM UTC

Hi Dennis,   
   
The reported issue "DisableForeColor not applied properly while using DropDownStyle is DropDown in SFComboBox" has been resolved, and the code changes have been included in our most recent weekly nuget version 19.4.0.41. The reported Nuget packages have been published on nuget.org. The packages can be downloaded from the following link.  
   
Nuget link: https://www.nuget.org/    
   
Please let us know if you need any further assistance.   
   
Regards,   
Thirupathi B. 



GS Gautam Sheth January 20, 2022 10:58 AM UTC

I am facing the same issue. I am using version 19.2.0.55. 

If possible please provide the patch for this.


Thanks. 
Gautam



PS Prabakaran Sangameswaran Syncfusion Team January 21, 2022 12:54 PM UTC

Hi Gautam,

Thanks for contacting Syncfusion support. 

Reported issue “SfComboBox: cannot change DisabledForeColor” has been fixed, please download the patch from the below link. 
 
 
Recommended approach - exe will perform automatic configuration.            
       
Please find the patch setup from below location:           
         
 
Please find the patch assemblies alone from below location:            
        
 
NuGet link 
 
 

Assembly Version: 19.2.0.55

  
Installation Directions:            
This patch should replace the files " Syncfusion.SfListView.WinForms” under the following folder.            
$system drive:\ Files\Syncfusion\Essential Studio\$Version # \precompiledassemblies\$Version#\[TargetFramework]            
E.g. : $system drive:\Program Files\Syncfusion\Essential Studio\19.2.0.55\precompiledassemblies\19.2.0.55\4.6  
            
To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you must manually copy and paste them to the preferred location, or you must run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.            
            
            
Disclaimer:            
Please note that we have created this patch for version 19.2.0.55 specifically to resolve the issue reported in this incident. If you have received other patches for the same version for other products, please apply all patches in the order received. Please let us know, if you are using any other Syncfusion version, we will provide patch in your version.  

Note: This Issue will be included in your upcoming NuGet and Main Release.

 
Please let us know if you need any further assistance on this. We will be glad to assist you. 

Regards, 
Prabakaran S 



NN nn June 30, 2023 01:31 PM UTC

if  on the form designer the ComboBoxMode property is set to  "SingleSelection" then the code

SfComboBox1.Style.EditorStyle.DisabledBackColor = Color.Yellow
SfComboBox1.Style.EditorStyle.DisabledForeColor = Color.Red

does not take any effect.

Now, if the ComboBoxMode  is set to multiselection then the color setting does apply. 

this is a very strange  behavior , I can characterized it as bug.

NN




MJ Madhumithan Jayapathi Syncfusion Team July 4, 2023 07:44 AM UTC

Hi NN,

Thanks for contacting Syncfusion support. 


We have checked your query and we understand that when the ComboBoxMode property is set to SingleSelection DisabledBackColor and DisabledForeColor are not working properly. But we can able to set the DisabledForeColor and its working fine from our end. Please refer to the screenshot for your reference.


Could you please provide the following details

  • Could you please confirm whether you are using a framework or .NET Core? If so, please specify the version.
  • Can you please provide the video demonstrating the scenario in which the issue is produced.
  • If possible, please share the modified sample.




SZ SZL March 1, 2024 08:40 PM UTC

Hi,

I have the same problem with the latest version. I have an inherited custom SfCombobox control, that referencing other files, so I cannot create an example but I created a simle button in my code to change combobox style at runtime:

   private void myButton1_Click(object sender, EventArgs e)

   {

       cbTermekcsoport.BackColor = GraboColor.ReadOnlyControlGrayForeColor;

       cbTermekcsoport.Style.ReadOnlyEditorStyle.BackColor = GraboColor.ReadOnlyControlGrayForeColor;

       cbTermekcsoport.Style.ReadOnlyEditorStyle.DisabledBackColor = GraboColor.ReadOnlyControlGrayForeColor;

       cbTermekcsoport.Style.EditorStyle.DisabledBackColor = GraboColor.ReadOnlyControlGrayForeColor;

   }

This works fine, the combobox backcolor will be set.

But this code has no effect:

        private void myButton1_Click(object sender, EventArgs e)

        {

            cbTermekcsoport.ForeColor = GraboColor.ReadOnlyControlGrayForeColor;

            cbTermekcsoport.Style.ReadOnlyEditorStyle.ForeColor = GraboColor.ReadOnlyControlGrayForeColor;

            cbTermekcsoport.Style.ReadOnlyEditorStyle.DisabledForeColor = GraboColor.ReadOnlyControlGrayForeColor;

            cbTermekcsoport.Style.EditorStyle.DisabledForeColor = GraboColor.ReadOnlyControlGrayForeColor;

        }

Unfortunatelly the forecolor never changing.

Thank you for help!


Loader.
Up arrow icon