Set tooltip describing form prefix

This commit is contained in:
Tim Young 2017-11-01 13:06:54 -05:00
parent 28549a9137
commit cdda440daf

View File

@ -27,6 +27,7 @@ namespace EduNetworkBuilder
List<TranslationFormData> FormData = new List<TranslationFormData>(); List<TranslationFormData> FormData = new List<TranslationFormData>();
string EnglishTargetFile = "edustrings.resx"; string EnglishTargetFile = "edustrings.resx";
bool ChangedFormData = false; bool ChangedFormData = false;
ToolTip myTooltip = new ToolTip();
public TranslationWindow(Network ToEdit) public TranslationWindow(Network ToEdit)
@ -42,6 +43,10 @@ namespace EduNetworkBuilder
{ {
FillTranslationFormData(); FillTranslationFormData();
myTooltip.AutoPopDelay = 5000;
myTooltip.InitialDelay = 1000;
myTooltip.ReshowDelay = 500;
cb1Language.Items.Clear(); cb1Language.Items.Clear();
cb2Language.Items.Clear(); cb2Language.Items.Clear();
@ -500,6 +505,16 @@ namespace EduNetworkBuilder
{ {
//We want to filter the form based on what we have here. //We want to filter the form based on what we have here.
PopulateFormTranslationItems(); PopulateFormTranslationItems();
string tooltip = "";
foreach(TranslationFormData one in FormData)
{
if(one.Prefix == cbFormFilter.Text)
{
tooltip = one.Description;
break;
}
}
myTooltip.SetToolTip(cbFormFilter,tooltip);
} }
} }