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]: KryptonRibbonGroup Controls remain enabled at runtime when set to disabled in the designer. #1561

Closed
giduac opened this issue Jun 22, 2024 · 6 comments
Labels
area:ribbon All issues to do with the ribbon. bug Something isn't working completed This issue has been completed. under investigation This bug/issue is currently under investigation. version:90 All things to do with V90.
Milestone

Comments

@giduac
Copy link
Contributor

giduac commented Jun 22, 2024

Describe the bug
KryptonRibbonGroup Controls remain enabled at runtime when set to disabled in the designer.
Controls affected:

  • KryptonRibbonGroupTextBox
  • KryptonRibbonGroupTrackBar
  • KryptonRibbonGroupDomainUpDown
  • KryptonRibbonGroupNumericUpDown

To Reproduce
Steps to reproduce the behavior:

  1. Add one of the above controls to a Ribbon
  2. Set the Enabled property to false
  3. Run the form.

Expected behaviour
When the control first is created and set to disabled it is still accessible.
If at runtime the control is set to disabled or enabled the control responds correct.
So at initialization the inner control is not disabled while the outer control is.

Screenshots
Show the setting after the property has been set the first time through the designer source.

devenv_6Zd4bXVkUg.mp4

Desktop (please complete the following information):

  • OS: Windows 11
  • Tested Framework/.NET 48 / 80
  • Toolkit Version: current alpha / 90.24.6.169-alpha (possibly present in V85, but not yet tested)

Additional Info
Other controls that don't have this problem have a similar codebase.
On first run when the control is set to disabled the propertyhandler has no subscribers. Tested that on TextBox and ComboBox. Though ComboBox does work.
Happens in both Ribbon Triple and Line Group.

Work-around
After InitializeComponent() has run, disabled controls from code.

Handle it from the property itself:

public bool Enabled
{
    get => _enabled;

    set
    {
        if (_enabled != value)
        {
            _enabled = value;

            if (PropertyChanged is not null)
            {
                OnPropertyChanged(nameof(Enabled));
            }
            else
            {
                TextBox!.Enabled = value;
            }
        }
    }
}
@giduac giduac added the bug Something isn't working label Jun 22, 2024
@giduac
Copy link
Contributor Author

giduac commented Jun 22, 2024

Hi @Smurf-IV & @Wagnerp,

Can you have a look at this please ?

@giduac giduac changed the title [Bug]: KryptonRibbonGroup Controls remain enabled at runtime when to disabled in the designer. [Bug]: KryptonRibbonGroup Controls remain enabled at runtime when set to disabled in the designer. Jun 23, 2024
@Smurf-IV Smurf-IV added area:ribbon All issues to do with the ribbon. regression Something was working in a previous release, but isn't working now. labels Jun 23, 2024
@Smurf-IV Smurf-IV self-assigned this Jun 23, 2024
@Smurf-IV Smurf-IV added the under investigation This bug/issue is currently under investigation. label Jun 23, 2024
@Smurf-IV
Copy link
Member

Smurf-IV commented Jun 23, 2024

@giduac I also found the disabling missing in the following controls:

  • GroupMaskedTextBox
  • GroupComboBox
  • GroupCustomControl
  • GroupDateTimePicker
  • GroupGallery
  • GroupRichTextBox

@Smurf-IV
Copy link
Member

@Wagnerp As so many controls have this missing, then I am assuming it is not a regression, OR, the timing of events is now different in the later core nets compared with framework !

@Smurf-IV Smurf-IV removed the regression Something was working in a previous release, but isn't working now. label Jun 23, 2024
@Smurf-IV Smurf-IV added this to the Version 90 milestone Jun 23, 2024
@Smurf-IV Smurf-IV added the version:90 All things to do with V90. label Jun 23, 2024
@Smurf-IV
Copy link
Member

Showing disabled in designer showing in Runtime:
image

Smurf-IV added a commit that referenced this issue Jun 23, 2024
@Smurf-IV Smurf-IV removed their assignment Jun 23, 2024
@Smurf-IV Smurf-IV added the completed This issue has been completed. label Jun 23, 2024
@giduac
Copy link
Contributor Author

giduac commented Jun 23, 2024

Reference in n

@Smurf-IV
In the test I did the four mentioned did it.
So there can be a difference between setups.

Anyways best to pull them all up to the same level...

@giduac
Copy link
Contributor Author

giduac commented Jun 23, 2024

@Smurf-IV & @Wagnerp
I'll check V85

Also in V85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:ribbon All issues to do with the ribbon. bug Something isn't working completed This issue has been completed. under investigation This bug/issue is currently under investigation. version:90 All things to do with V90.
Projects
None yet
Development

No branches or pull requests

2 participants