Proxy TooltipText from TextWidget to IconListView

This commit is contained in:
John Lewin 2018-02-15 14:29:38 -08:00
parent 78341ef3e2
commit ea450868fa
2 changed files with 10 additions and 2 deletions

View file

@ -192,6 +192,8 @@ namespace MatterHackers.MatterControl.CustomWidgets
internal static int ItemPadding = 2;
private TextWidget text;
public IconViewItem(ListViewItem item, int thumbWidth, int thumbHeight)
: base(item, thumbWidth, thumbHeight)
{
@ -227,7 +229,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
};
container.AddChild(imageWidget);
var text = new TextWidget(item.Model.Name, 0, 0, 9, textColor: ActiveTheme.Instance.PrimaryTextColor)
text = new TextWidget(item.Model.Name, 0, 0, 9, textColor: ActiveTheme.Instance.PrimaryTextColor)
{
AutoExpandBoundsToText = false,
EllipsisIfClipped = true,
@ -248,6 +250,12 @@ namespace MatterHackers.MatterControl.CustomWidgets
this.SetItemThumbnail(loadingImage);
}
public override string ToolTipText
{
get => text.ToolTipText;
set => text.ToolTipText = value;
}
public override async void OnLoad(EventArgs args)
{
base.OnLoad(args);