RobinPerris / DarkUI

Dark themed control and docking library for .NET WinForms.
MIT License
834 stars 185 forks source link

DarkComboBox Not Drawing Correctly #35

Closed Kyle-Lancaster closed 3 years ago

Kyle-Lancaster commented 3 years ago

The DarkComboBox is not drawing correctly if it is in a TableLayoutPanel cell and "Dock" is set to "Fill" and the form is resized. It seems to only draw correctly for the region that represents the original size of the DarkComboBox.

As a work around, when the DarkComboBox is created I set the width to something larger than the form will ever be (such as int.MaxValue) this draws the DarkComboBox correctly even when the form is shrunk. Example workaround code (where "comboControl" is the DarkComboBox):

comboControl.Size = new Size(int.MaxValue, comboControl.Size.Height);

Here is a screenshot of the DarkComboBox before the form is resized:

image

And here it is after the form is resized:

image

RobinPerris commented 3 years ago

Can you confirm which version you're using? This should have been fixed by https://github.com/RobinPerris/DarkUI/pull/26 (version 2.0.1)

Kyle-Lancaster commented 3 years ago

According to the NuGet Package Manager I am using 2.0.1, but if I check the reference properties or file properties of the DLL then it is 2.0.0

Not sure what is going on. I installed it via the NuGet Package Manager.

image

image

image

Kyle-Lancaster commented 3 years ago

Moments after I previously commented I saw you just released 2.02 on NuGet. After installing that version the issue is resolved.

Thanks a lot!

RobinPerris commented 3 years ago

Yeah, I was able to replicate your issue by swapping to NuGet 2.0.1. Looks like I botched the release and included an outdated DLL.

Sorry about that. 2.0.2 also includes another fix for dropdown items not clearing as an added bonus. 👍