Add reusable SearchButton helper

This commit is contained in:
John Lewin 2018-01-10 23:21:46 -08:00
parent b5abcfdbd1
commit 1b5f1daed1
3 changed files with 12 additions and 6 deletions

View file

@ -138,12 +138,8 @@ namespace MatterHackers.MatterControl.PrintLibrary
navBar.AddChild(searchPanel);
var searchButton = new IconButton(AggContext.StaticData.LoadIcon("icon_search_24x24.png", 16, 16, IconColor.Theme), theme)
{
ToolTipText = "Search".Localize(),
Name = "Search Library Button",
};
searchButton.VisibleChanged += (s, e) => Console.WriteLine();
var searchButton = ApplicationController.Instance.Theme.CreateSearchButton();
searchButton.Name = "Search Library Button";
searchButton.Click += (s, e) =>
{
if (searchPanel.Visible)