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

- Replace the scatter-gun Ribbon Tooltips with the Standard kit `Tool… #512

Merged
merged 1 commit into from
Dec 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Documents/Help/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# <img src="https:/Krypton-Suite/Standard-Toolkit/blob/master/Krypton.png"> Standard Toolkit - Changelog

## 2022-01-05 - Build 2201 - January 2022
* Fixed [#511](https:/Krypton-Suite/Standard-Toolkit/issues/511), KryptonRibbonGroupComboBox does not have tooltips
* Fixed [#382](https:/Krypton-Suite/Standard-Toolkit/issues/382), RibbonGroupNumericUpDown does not have tooltips
* Fixed [#453](https:/Krypton-Suite/Standard-Toolkit/issues/453), KryptonDataGridView's cell cannot display multiple lines when DefaultCellStyle.WrapMode set true
* Fixed [#499](https:/Krypton-Suite/Standard-Toolkit/issues/499), `KDataGridView` Cell Borders
* Fixed [#502](https:/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.

Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,11 @@ public override int ItemGap(IRibbonGroupItem previousItem) =>
// 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 int ItemGap(IRibbonGroupItem previousItem) =>
/// <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
Original file line number Diff line number Diff line change
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
Loading