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

[Bug]: Combobox heights and Text positioning not correct when Padding is applied to the DropDown Content #1832

Closed
Fungusware opened this issue Oct 31, 2024 · 14 comments
Labels
area:toolkit All issues related to the toolkit components. bug Something isn't working fixed This issue has been fixed. regression Something was working in a previous release, but isn't working now. version:85-lts All things to do with V85 LTS. version:90 All things to do with V90.

Comments

@Fungusware
Copy link

Describe the bug
Combobox heights and Text positioning not correct when Padding is applied to the DropDown Content

To Reproduce
Add a Krypton Combobox to a form and set the properties as shown
image

Expected behavior
Combobox should expand its height to fit the text and padding much like the Text box does.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 11
  • Framework/.NET Version: [e.g. 6.0]
  • Toolkit Version: 85.24.10.288
@Fungusware Fungusware added the bug Something isn't working label Oct 31, 2024
@Smurf-IV Smurf-IV added regression Something was working in a previous release, but isn't working now. area:toolkit All issues related to the toolkit components. version:85-lts All things to do with V85 LTS. version:90 All things to do with V90. labels Oct 31, 2024
@PWagner1 PWagner1 added this to the Version 85 (LTS) milestone Oct 31, 2024
@giduac
Copy link
Contributor

giduac commented Nov 2, 2024

Hi @Smurf-IV,

The normal combobox does not have a padding property. The KCombo only receives this property through StateCommon.ComboBox.Content.

It looks like this is something that should not be there or has nothing todo with the inner combobox.

@Fungusware
Best to to leave this at it's default value.
What is it you are trying to accomplish ?

@giduac giduac added the awaiting feedback A fix for this issue has been implemented, waiting for feedback on the fix. label Nov 2, 2024
@giduac giduac self-assigned this Nov 2, 2024
@Fungusware
Copy link
Author

Fungusware commented Nov 2, 2024 via email

@Smurf-IV
Copy link
Member

Smurf-IV commented Nov 3, 2024

It looks like this is something that should not be there or has nothing todo with the inner combobox.

Yes it should, for curvature and other stylings to bring in line for Terminal style apps

@Fungusware Best to to leave this at it's default value. What is it you are trying to accomplish ?

Have you tried using V90 (Or alpha)

@Fungusware
Copy link
Author

@Smurf-IV Is there a solid chance that v90 or higher would work? I'm quite locked to .net6.0 at the moment. I could upgrade assuming the changes are substantial and beneficial.

@Smurf-IV
Copy link
Member

Smurf-IV commented Nov 5, 2024

Just need it as a cross check, to see if the "fix" / regression has been done in V90.
Then that same "fix" can be retrofitted down into V85 LTS.
If not it a whole new investigation which could take longer.
Also, Can you add a simple demo, just in case it's a config / manifest issue ?

@Fungusware
Copy link
Author

Fungusware commented Nov 5, 2024

KryptonBugDemo.zip

https://github.com/Fungusware/KryptonBugDemo

No problem, and thanks for the fast assistance. The Toolkit is an integral part of my development life, so your attention is much appriciated.

Attached is a NET6 and NET8 example of the issue I am facing.

@giduac
Copy link
Contributor

giduac commented Jan 24, 2025

Hi @Fungusware,

I've removed the previous post and spent some more time on this.

Can you please test the class below and use this as combobox on the form.

  • Make sure to set IntegralHeight to true, to show list items in full.
  • Use the MinimumSize to force the control to use the desired size.
  • OnSizeChanged() will vertically center the inner combobox.

Please let us know what you think it.

using System.ComponentModel;
using System.Diagnostics;

namespace KryptonBugDemoNet8
{
    public class CustomCombo : Krypton.Toolkit.KryptonComboBox
    {
        [DefaultValue(false)]
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
        public new bool IntegralHeight
        {
            get => base.IntegralHeight;
            set => base.IntegralHeight = value;
        }

        protected override void OnSizeChanged(EventArgs e)
        {
            base.OnSizeChanged(e);
            ComboBox.Top = (this.Height / 2) - (ComboBox.Height / 2);
        }
    }
}

@Fungusware
Copy link
Author

I think its getting better, Applying rounding seemed to cause the text to jump back to the top though.

Image

@giduac
Copy link
Contributor

giduac commented Jan 25, 2025

Nice so far.
This needs a bit more work. Also changing font size, padding, etc. need to be looked at.
I'll keep you posted.

@giduac
Copy link
Contributor

giduac commented Jan 28, 2025

Hi @Fungusware,

A bit further.

I'd please like you to clone and test this repo / branch:
https://github.com/giduac/Standard-Toolkit/tree/1832-V100-KryptonComboBox-does-not-respect-padding

You can build it from inside VStudio and run TestForm. In the StartScreen's lower right corner there's a button for the test.
Left propertygrid is for the KCombo
Middle for the inner combo
Right for the custom palette.

2 similar comments
@giduac
Copy link
Contributor

giduac commented Feb 5, 2025

Hi @Fungusware,

A bit further.

I'd please like you to clone and test this repo / branch:
https://github.com/giduac/Standard-Toolkit/tree/1832-V100-KryptonComboBox-does-not-respect-padding

You can build it from inside VStudio and run TestForm. In the StartScreen's lower right corner there's a button for the test.
Left propertygrid is for the KCombo
Middle for the inner combo
Right for the custom palette.

@giduac
Copy link
Contributor

giduac commented Feb 8, 2025

Hi @Fungusware,

A bit further.

I'd please like you to clone and test this repo / branch:
https://github.com/giduac/Standard-Toolkit/tree/1832-V100-KryptonComboBox-does-not-respect-padding

You can build it from inside VStudio and run TestForm. In the StartScreen's lower right corner there's a button for the test.
Left propertygrid is for the KCombo
Middle for the inner combo
Right for the custom palette.

@Fungusware
Copy link
Author

I'm having some issue getting the Solution to build. I'll ty and get back to you.

@giduac
Copy link
Contributor

giduac commented Feb 15, 2025

Hi @Fungusware,

The proposed changed has been merged and will be included in V85 next patch, V95 next patch and V100 dev branch.

@giduac giduac closed this as completed Feb 15, 2025
@PWagner1 PWagner1 added fixed This issue has been fixed. and removed awaiting feedback A fix for this issue has been implemented, waiting for feedback on the fix. labels Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:toolkit All issues related to the toolkit components. bug Something isn't working fixed This issue has been fixed. regression Something was working in a previous release, but isn't working now. version:85-lts All things to do with V85 LTS. version:90 All things to do with V90.
Projects
None yet
Development

No branches or pull requests

4 participants