diff --git a/Documents/Help/Changelog.md b/Documents/Help/Changelog.md index df6893ac7..8c9fa3796 100644 --- a/Documents/Help/Changelog.md +++ b/Documents/Help/Changelog.md @@ -3,6 +3,7 @@ ======= ## 2024-06-24 - Build 2406 - June 2024 +* Resolved [#1561](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1561), KryptonRibbonGroup Controls remain enabled at runtime when set to disabled in the designer. * Resolved [#1302](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1302), **[Breaking Change]** Font being used by "Professional" theme is pants ! * Resolved [#1528](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1528), Tracking colours need reviewing * Resolved [#982](https://github.com/Krypton-Suite/Standard-Toolkit/issues/982), Double click on the Form1 file in the Krypton toolkit test project results in a designer error diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupComboBox.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupComboBox.cs index 11877372f..979db6671 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupComboBox.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupComboBox.cs @@ -80,6 +80,10 @@ public ViewDrawRibbonGroupComboBox([DisallowNull] KryptonRibbon ribbon, // Give paint delegate to combobox so its palette changes are redrawn GroupComboBox.ViewPaintDelegate = needPaint; + // Update all views to reflect current state + UpdateEnabled(GroupComboBox.ComboBox); + UpdateVisible(GroupComboBox.ComboBox); + // Hook into changes in the ribbon custom definition GroupComboBox.PropertyChanged += OnComboBoxPropertyChanged; diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCustomControl.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCustomControl.cs index 6361a29d0..040f7a654 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCustomControl.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupCustomControl.cs @@ -80,6 +80,9 @@ public ViewDrawRibbonGroupCustomControl([DisallowNull] KryptonRibbon ribbon, // Give paint delegate to label so its palette changes are redrawn GroupCustomControl.ViewPaintDelegate = needPaint; + // Update all views to reflect current state + UpdateVisible(GroupCustomControl.CustomControl); + // Hook into changes in the ribbon custom definition GroupCustomControl.PropertyChanged += OnCustomPropertyChanged; NULL_CONTROL_WIDTH = (int)(50 * FactorDpiX); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDateTimePicker.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDateTimePicker.cs index ff670285a..33f689aef 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDateTimePicker.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDateTimePicker.cs @@ -80,6 +80,10 @@ public ViewDrawRibbonGroupDateTimePicker([DisallowNull] KryptonRibbon ribbon, // Give paint delegate to date time picker so its palette changes are redrawn GroupDateTimePicker.ViewPaintDelegate = needPaint; + // Update all views to reflect current state + UpdateEnabled(GroupDateTimePicker.DateTimePicker); + UpdateVisible(GroupDateTimePicker.DateTimePicker); + // Hook into changes in the ribbon custom definition GroupDateTimePicker.PropertyChanged += OnDateTimePickerPropertyChanged; NULL_CONTROL_WIDTH = (int)(50 * FactorDpiX); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDomainUpDown.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDomainUpDown.cs index cf74ad162..e2c6f764b 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDomainUpDown.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupDomainUpDown.cs @@ -80,6 +80,10 @@ public ViewDrawRibbonGroupDomainUpDown([DisallowNull] KryptonRibbon ribbon, // Give paint delegate to domain up-down so its palette changes are redrawn GroupDomainUpDown.ViewPaintDelegate = needPaint; + // Update all views to reflect current state + UpdateEnabled(GroupDomainUpDown.DomainUpDown); + UpdateVisible(GroupDomainUpDown.DomainUpDown); + // Hook into changes in the ribbon custom definition GroupDomainUpDown.PropertyChanged += OnDomainUpDownPropertyChanged; NULL_CONTROL_WIDTH = (int)(50 * FactorDpiX); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGallery.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGallery.cs index 3c2c3ed1b..00a064a9e 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGallery.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupGallery.cs @@ -93,6 +93,10 @@ public ViewDrawRibbonGroupGallery([DisallowNull] KryptonRibbon ribbon, // Give paint delegate to gallery so its palette changes are redrawn GroupGallery.ViewPaintDelegate = needPaint; + // Update all views to reflect current state + UpdateEnabled(GroupGallery.Gallery); + UpdateVisible(GroupGallery.Gallery); + // Hook into changes in the ribbon custom definition GroupGallery.PropertyChanged += OnGalleryPropertyChanged; NULL_CONTROL_WIDTH = (int)(50 * FactorDpiX); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupMaskedTextBox.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupMaskedTextBox.cs index 52b441da4..379f741ed 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupMaskedTextBox.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupMaskedTextBox.cs @@ -80,6 +80,10 @@ public ViewDrawRibbonGroupMaskedTextBox([DisallowNull] KryptonRibbon ribbon, // Give paint delegate to masked textbox so its palette changes are redrawn GroupMaskedTextBox.ViewPaintDelegate = needPaint; + // Update all views to reflect current state + UpdateEnabled(GroupMaskedTextBox.MaskedTextBox); + UpdateVisible(GroupMaskedTextBox.MaskedTextBox); + // Hook into changes in the ribbon custom definition GroupMaskedTextBox.PropertyChanged += OnMaskedTextBoxPropertyChanged; NULL_CONTROL_WIDTH = (int)(50 * FactorDpiX); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupNumericUpDown.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupNumericUpDown.cs index 3f9873b68..5ba19ad9b 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupNumericUpDown.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupNumericUpDown.cs @@ -80,6 +80,10 @@ public ViewDrawRibbonGroupNumericUpDown([DisallowNull] KryptonRibbon ribbon, // Give paint delegate to numeric up-down so its palette changes are redrawn GroupNumericUpDown.ViewPaintDelegate = needPaint; + // Update all views to reflect current state + UpdateEnabled(GroupNumericUpDown.NumericUpDown); + UpdateVisible(GroupNumericUpDown.NumericUpDown); + // Hook into changes in the ribbon custom definition GroupNumericUpDown.PropertyChanged += OnNumericUpDownPropertyChanged; NULL_CONTROL_WIDTH = (int)(50 * FactorDpiX); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRichTextBox.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRichTextBox.cs index cae0ce6f7..d89da7860 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRichTextBox.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupRichTextBox.cs @@ -80,6 +80,10 @@ public ViewDrawRibbonGroupRichTextBox([DisallowNull] KryptonRibbon ribbon, // Give paint delegate to richtextbox so its palette changes are redrawn GroupRichTextBox.ViewPaintDelegate = needPaint; + // Update all views to reflect current state + UpdateEnabled(GroupRichTextBox.RichTextBox); + UpdateVisible(GroupRichTextBox.RichTextBox); + // Hook into changes in the ribbon custom definition GroupRichTextBox.PropertyChanged += OnRichTextBoxPropertyChanged; NULL_CONTROL_WIDTH = (int)(50 * FactorDpiX); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTextBox.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTextBox.cs index 46efa4ccc..d79f73625 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTextBox.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTextBox.cs @@ -80,6 +80,10 @@ public ViewDrawRibbonGroupTextBox([DisallowNull] KryptonRibbon ribbon, // Give paint delegate to textbox so its palette changes are redrawn GroupTextBox.ViewPaintDelegate = needPaint; + // Update all views to reflect current state + UpdateEnabled(GroupTextBox.TextBox); + UpdateVisible(GroupTextBox.TextBox); + // Hook into changes in the ribbon custom definition GroupTextBox.PropertyChanged += OnTextBoxPropertyChanged; NULL_CONTROL_WIDTH = (int)(50 * FactorDpiX); diff --git a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTrackBar.cs b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTrackBar.cs index f8ff9148b..40f584ad7 100644 --- a/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTrackBar.cs +++ b/Source/Krypton Components/Krypton.Ribbon/View Draw/ViewDrawRibbonGroupTrackBar.cs @@ -80,8 +80,12 @@ public ViewDrawRibbonGroupTrackBar([DisallowNull] KryptonRibbon ribbon, // Give paint delegate to textbox so its palette changes are redrawn GroupTrackBar.ViewPaintDelegate = needPaint; + // Update all views to reflect current state + UpdateEnabled(GroupTrackBar.TrackBar); + UpdateVisible(GroupTrackBar.TrackBar); + // Hook into changes in the ribbon custom definition - GroupTrackBar.PropertyChanged += OnTextBoxPropertyChanged; + GroupTrackBar.PropertyChanged += OnTrackBarPropertyChanged; NULL_CONTROL_WIDTH = (int)(50 * FactorDpiX); } @@ -107,7 +111,7 @@ protected override void Dispose(bool disposing) GroupTrackBar.MouseEnterControl -= OnMouseEnterControl; GroupTrackBar.MouseLeaveControl -= OnMouseLeaveControl; GroupTrackBar.ViewPaintDelegate = null; - GroupTrackBar.PropertyChanged -= OnTextBoxPropertyChanged; + GroupTrackBar.PropertyChanged -= OnTrackBarPropertyChanged; _ribbon.ViewRibbonManager.LayoutAfter -= OnLayoutAction; _ribbon.ViewRibbonManager.LayoutBefore -= OnLayoutAction; @@ -375,7 +379,7 @@ protected virtual void OnNeedPaint(bool needLayout, Rectangle invalidRect) #region Implementation private void OnContextClick(object sender, MouseEventArgs e) => GroupTrackBar.OnDesignTimeContextMenu(e); - private void OnTextBoxPropertyChanged(object sender, PropertyChangedEventArgs e) + private void OnTrackBarPropertyChanged(object sender, PropertyChangedEventArgs e) { var updateLayout = false; const bool UPDATE_PAINT = false;