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
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
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.
Thirupathi B.
I am facing the same issue. I am using version 19.2.0.55.
If possible please provide the patch for this.
Thanks.
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:
Assemblies Link: https://syncfusion.com/Installs/support/patch/19.2.0.55/809864/F170926/SyncfusionPatch_19.2.0.55_809864_1212022061803949_F170926.zip
NuGet link:
|
Assembly Version: 19.2.0.55
Note: This Issue will be included in your upcoming NuGet and Main Release.
Regards,
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
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.
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!
- 11 Replies
- 8 Participants
-
DN Dennis Neuhaeuser
- Dec 3, 2021 05:57 PM UTC
- Mar 1, 2024 08:40 PM UTC