Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RJ custom combo box doesn't work even when i downloaded it from GitHub #3

Open
NamanyaBruce opened this issue Mar 21, 2022 · 2 comments

Comments

@NamanyaBruce
Copy link

When I try to the RJ Custom Combo Box, the Topline of the rectangle is faded and when I try to resize it everything messes up. i tried to set its property auto-size to true but then it kept resizing all the time. where have I gone wrong Sir?. Help me but all other controls are working perfectly fine. Thank you, Sir.
issue1
issue2

@RJCodeAdvance
Copy link
Owner

RJCodeAdvance commented Mar 25, 2022

Hi,
I just realized this issue, it happens because the ComboBox is bigger than the UserControl, therefore it exceeds its limits.
To fix it, create a condition to know the height of the ComboBox is bigger than the height of the UserControl, if so, set the height of the comboBox to the height of the UserControl (Adding the border size), you can use the AdjustComboBoxDimensions() method, and call it from size changes, for example font, also from the load event.
Update the code, if you want you can download the modified control.

_if (cmbList.Height >= this.Height)
{
    this.Height = cmbList.Height + (this.borderSize*2);
}_

@NamanyaBruce
Copy link
Author

NamanyaBruce commented Mar 29, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants