Skip to content

Commit

Permalink
Merge pull request #1568 from giduac/1561-V85-KryptonRibbonGroup-Cont…
Browse files Browse the repository at this point in the history
…rols-Remain-Enabled

1561-V85-KryptonRibbonGroup-Controls-Remain-Enabled
  • Loading branch information
Smurf-IV authored Jun 24, 2024
2 parents 33790ed + a3d8bb2 commit f21fa83
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 3 deletions.
1 change: 1 addition & 0 deletions Documents/Help/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit f21fa83

Please sign in to comment.