Skip to content

Commit

Permalink
- Replace the scatter-gun Ribbon Tooltips with the Standard kit `Tool…
Browse files Browse the repository at this point in the history
…TipValues`

- Fix fallout of the changes
- Update Readme and start to Add "Breaking Changes"
- Update Changelog
#511
#382
  • Loading branch information
Smurf-IV committed Dec 6, 2021
1 parent 8ecea6a commit 6c22ca7
Show file tree
Hide file tree
Showing 28 changed files with 253 additions and 796 deletions.
2 changes: 2 additions & 0 deletions Documents/Help/Changelog.md
@@ -1,6 +1,8 @@
# <img src="https://github.com/Krypton-Suite/Standard-Toolkit/blob/master/Krypton.png"> Standard Toolkit - Changelog

## 2022-01-05 - Build 2201 - January 2022
* Fixed [#511](https://github.com/Krypton-Suite/Standard-Toolkit/issues/511), KryptonRibbonGroupComboBox does not have tooltips
* Fixed [#382](https://github.com/Krypton-Suite/Standard-Toolkit/issues/382), RibbonGroupNumericUpDown does not have tooltips
* Fixed [#453](https://github.com/Krypton-Suite/Standard-Toolkit/issues/453), KryptonDataGridView's cell cannot display multiple lines when DefaultCellStyle.WrapMode set true
* Fixed [#499](https://github.com/Krypton-Suite/Standard-Toolkit/issues/499), `KDataGridView` Cell Borders
* Fixed [#502](https://github.com/Krypton-Suite/Standard-Toolkit/issues/502),KNumericUpDowner, when told to display 1 decimal place, does not display a 0 when needed
Expand Down
11 changes: 11 additions & 0 deletions README.md

Large diffs are not rendered by default.

Expand Up @@ -158,6 +158,12 @@ public interface IRibbonGroupItem
/// <param name="needPaint">Delegate for notifying changes in display.</param>
/// <returns>ViewBase derived instance.</returns>
ViewBase CreateView(KryptonRibbon ribbon, NeedPaintHandler needPaint);

ToolTipValues ToolTipValues
{
// Return base objects tooltip
get;
}
}
#endregion

Expand Down
Expand Up @@ -101,10 +101,6 @@ public KryptonRibbonGroupButton()
_itemSizeMax = GroupItemSize.Large;
_itemSizeMin = GroupItemSize.Small;
_itemSizeCurrent = GroupItemSize.Large;
ToolTipImageTransparentColor = Color.Empty;
ToolTipTitle = string.Empty;
ToolTipBody = string.Empty;
ToolTipStyle = LabelStyle.SuperTip;
}
#endregion

Expand Down Expand Up @@ -353,55 +349,11 @@ public void ResetShortcutKeys()
ShortcutKeys = Keys.None;
}

/// <summary>
/// Gets and sets the tooltip label style for group button.
/// </summary>
[Category("Appearance")]
[Description("Tooltip style for the group button.")]
[DefaultValue(typeof(LabelStyle), "SuperTip")]
public LabelStyle ToolTipStyle { get; set; }

/// <summary>
/// Gets and sets the image for the item ToolTip.
/// </summary>
[Bindable(true)]
[Category("Appearance")]
[Description("Display image associated ToolTip.")]
[DefaultValue(null)]
[Localizable(true)]
public Image ToolTipImage { get; set; }

/// <summary>
/// Gets and sets the color to draw as transparent in the ToolTipImage.
/// Gets access to the Wrapped Controls Tooltips.
/// </summary>
[Bindable(true)]
[Category("Appearance")]
[Description("Color to draw as transparent in the ToolTipImage.")]
[KryptonDefaultColor()]
[Localizable(true)]
public Color ToolTipImageTransparentColor { get; set; }

/// <summary>
/// Gets and sets the title text for the item ToolTip.
/// </summary>
[Bindable(true)]
[Category("Appearance")]
[Description("Title text for use in associated ToolTip.")]
[Editor("System.ComponentModel.Design.MultilineStringEditor", typeof(UITypeEditor))]
[DefaultValue("")]
[Localizable(true)]
public string ToolTipTitle { get; set; }

/// <summary>
/// Gets and sets the body text for the item ToolTip.
/// </summary>
[Bindable(true)]
[Category("Appearance")]
[Description("Body text for use in associated ToolTip.")]
[Editor("System.ComponentModel.Design.MultilineStringEditor", typeof(UITypeEditor))]
[DefaultValue("")]
[Localizable(true)]
public string ToolTipBody { get; set; }
public override ToolTipValues ToolTipValues => _toolTipValues;

/// <summary>
/// Gets and sets the context strip for showing when the button is pressed.
Expand Down Expand Up @@ -541,8 +493,11 @@ public override GroupItemSize ItemSizeCurrent
/// <returns>ViewBase derived instance.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override ViewBase CreateView(KryptonRibbon ribbon,
NeedPaintHandler needPaint) =>
new ViewDrawRibbonGroupButton(ribbon, this, needPaint);
NeedPaintHandler needPaint)
{
_toolTipValues.NeedPaint = needPaint;
return new ViewDrawRibbonGroupButton(ribbon, this, needPaint);
}

/// <summary>
/// Generates a Click event for a button.
Expand Down Expand Up @@ -839,17 +794,6 @@ internal override bool ProcessCmdKey(ref Message msg, Keys keyData)

return false;
}

internal override LabelStyle InternalToolTipStyle => ToolTipStyle;

internal override Image InternalToolTipImage => ToolTipImage;

internal override Color InternalToolTipImageTransparentColor => ToolTipImageTransparentColor;

internal override string InternalToolTipTitle => ToolTipTitle;

internal override string InternalToolTipBody => ToolTipBody;

#endregion

#region Implementation
Expand Down
Expand Up @@ -99,10 +99,6 @@ public KryptonRibbonGroupCheckBox()
_itemSizeMax = GroupItemSize.Large;
_itemSizeMin = GroupItemSize.Small;
_itemSizeCurrent = GroupItemSize.Large;
ToolTipImageTransparentColor = Color.Empty;
ToolTipTitle = string.Empty;
ToolTipBody = string.Empty;
ToolTipStyle = LabelStyle.SuperTip;
}
#endregion

Expand Down Expand Up @@ -360,55 +356,11 @@ public void ResetShortcutKeys()
ShortcutKeys = Keys.None;
}


/// <summary>
/// Gets and sets the tooltip label style for group check box.
/// Gets access to the Wrapped Controls Tooltips.
/// </summary>
[Category("Appearance")]
[Description("Tooltip style for the group check box.")]
[DefaultValue(typeof(LabelStyle), "SuperTip")]
public LabelStyle ToolTipStyle { get; set; }

/// <summary>
/// Gets and sets the image for the item ToolTip.
/// </summary>
[Bindable(true)]
[Category("Appearance")]
[Description("Display image associated ToolTip.")]
[DefaultValue(null)]
[Localizable(true)]
public Image ToolTipImage { get; set; }

/// <summary>
/// Gets and sets the color to draw as transparent in the ToolTipImage.
/// </summary>
[Bindable(true)]
[Category("Appearance")]
[Description("Color to draw as transparent in the ToolTipImage.")]
[KryptonDefaultColor()]
[Localizable(true)]
public Color ToolTipImageTransparentColor { get; set; }

/// <summary>
/// Gets and sets the title text for the item ToolTip.
/// </summary>
[Bindable(true)]
[Category("Appearance")]
[Description("Title text for use in associated ToolTip.")]
[Editor("System.ComponentModel.Design.MultilineStringEditor", typeof(UITypeEditor))]
[DefaultValue("")]
[Localizable(true)]
public string ToolTipTitle { get; set; }

/// <summary>
/// Gets and sets the body text for the item ToolTip.
/// </summary>
[Bindable(true)]
[Category("Appearance")]
[Description("Body text for use in associated ToolTip.")]
[Editor("System.ComponentModel.Design.MultilineStringEditor", typeof(UITypeEditor))]
[DefaultValue("")]
[Localizable(true)]
public string ToolTipBody { get; set; }
public override ToolTipValues ToolTipValues => _toolTipValues;

/// <summary>
/// Gets and sets the associated KryptonCommand.
Expand Down Expand Up @@ -508,8 +460,11 @@ public override GroupItemSize ItemSizeCurrent
/// <returns>ViewBase derived instance.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override ViewBase CreateView(KryptonRibbon ribbon,
NeedPaintHandler needPaint) =>
new ViewDrawRibbonGroupCheckBox(ribbon, this, needPaint);
NeedPaintHandler needPaint)
{
_toolTipValues.NeedPaint = needPaint;
return new ViewDrawRibbonGroupCheckBox(ribbon, this, needPaint);
}

/// <summary>
/// Generates a Click event for a check box.
Expand Down Expand Up @@ -690,16 +645,6 @@ internal override bool ProcessCmdKey(ref Message msg, Keys keyData)
return false;
}

internal override LabelStyle InternalToolTipStyle => ToolTipStyle;

internal override Image InternalToolTipImage => ToolTipImage;

internal override Color InternalToolTipImageTransparentColor => ToolTipImageTransparentColor;

internal override string InternalToolTipTitle => ToolTipTitle;

internal override string InternalToolTipBody => ToolTipBody;

#endregion
}
}
Expand Up @@ -276,6 +276,11 @@ public override GroupItemSize ItemSizeCurrent
// We always want 3 pixels space between previous item and us
3;

/// <summary>
/// Gets access to the Wrapped Controls Tooltips.
/// </summary>
public override ToolTipValues ToolTipValues => _toolTipValues;

/// <summary>
/// Creates an appropriate view element for this item.
/// </summary>
Expand All @@ -284,8 +289,11 @@ public override GroupItemSize ItemSizeCurrent
/// <returns>ViewBase derived instance.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override ViewBase CreateView(KryptonRibbon ribbon,
NeedPaintHandler needPaint) =>
new ViewLayoutRibbonGroupCluster(ribbon, this, needPaint);
NeedPaintHandler needPaint)
{
_toolTipValues.NeedPaint = needPaint;
return new ViewLayoutRibbonGroupCluster(ribbon, this, needPaint);
}

/// <summary>
/// Gets the collection of ribbon group button cluster items.
Expand Down
Expand Up @@ -97,10 +97,6 @@ public KryptonRibbonGroupClusterButton()
_buttonType = GroupButtonType.Push;
_contextMenuStrip = null;
_kryptonContextMenu = null;
ToolTipImageTransparentColor = Color.Empty;
ToolTipTitle = string.Empty;
ToolTipBody = string.Empty;
ToolTipStyle = LabelStyle.SuperTip;
}
#endregion

Expand Down Expand Up @@ -296,55 +292,11 @@ public void ResetShortcutKeys()
ShortcutKeys = Keys.None;
}


/// <summary>
/// Gets and sets the tooltip label style for group cluster button.
/// Gets access to the Wrapped Controls Tooltips.
/// </summary>
[Category("Appearance")]
[Description("Tooltip style for the group cluster button.")]
[DefaultValue(typeof(LabelStyle), "SuperTip")]
public LabelStyle ToolTipStyle { get; set; }

/// <summary>
/// Gets and sets the image for the item ToolTip.
/// </summary>
[Bindable(true)]
[Category("Appearance")]
[Description("Display image associated ToolTip.")]
[DefaultValue(null)]
[Localizable(true)]
public Image ToolTipImage { get; set; }

/// <summary>
/// Gets and sets the color to draw as transparent in the ToolTipImage.
/// </summary>
[Bindable(true)]
[Category("Appearance")]
[Description("Color to draw as transparent in the ToolTipImage.")]
[KryptonDefaultColor()]
[Localizable(true)]
public Color ToolTipImageTransparentColor { get; set; }

/// <summary>
/// Gets and sets the title text for the item ToolTip.
/// </summary>
[Bindable(true)]
[Category("Appearance")]
[Description("Title text for use in associated ToolTip.")]
[Editor("System.ComponentModel.Design.MultilineStringEditor", typeof(UITypeEditor))]
[DefaultValue("")]
[Localizable(true)]
public string ToolTipTitle { get; set; }

/// <summary>
/// Gets and sets the body text for the item ToolTip.
/// </summary>
[Bindable(true)]
[Category("Appearance")]
[Description("Body text for use in associated ToolTip.")]
[Editor("System.ComponentModel.Design.MultilineStringEditor", typeof(UITypeEditor))]
[DefaultValue("")]
[Localizable(true)]
public string ToolTipBody { get; set; }
public override ToolTipValues ToolTipValues => _toolTipValues;

/// <summary>
/// Gets and sets the context strip for showing when the button is pressed.
Expand Down Expand Up @@ -512,8 +464,11 @@ public override GroupItemSize ItemSizeCurrent
/// <returns>ViewBase derived instance.</returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override ViewBase CreateView(KryptonRibbon ribbon,
NeedPaintHandler needPaint) =>
new ViewDrawRibbonGroupClusterButton(ribbon, this, needPaint);
NeedPaintHandler needPaint)
{
_toolTipValues.NeedPaint = needPaint;
return new ViewDrawRibbonGroupClusterButton(ribbon, this, needPaint);
}

/// <summary>
/// Generates a Click event for a button.
Expand Down Expand Up @@ -807,16 +762,6 @@ internal override bool ProcessCmdKey(ref Message msg, Keys keyData)
return false;
}

internal override LabelStyle InternalToolTipStyle => ToolTipStyle;

internal override Image InternalToolTipImage => ToolTipImage;

internal override Color InternalToolTipImageTransparentColor => ToolTipImageTransparentColor;

internal override string InternalToolTipTitle => ToolTipTitle;

internal override string InternalToolTipBody => ToolTipBody;

#endregion

#region Implementation
Expand Down

0 comments on commit 6c22ca7

Please sign in to comment.