Add clear button to command box

This commit is contained in:
2023-10-18 23:03:25 +08:00
parent f5780a4366
commit b1debe0aab
3 changed files with 69 additions and 4 deletions

View File

@@ -765,5 +765,22 @@ namespace GrasscutterTools.Forms
}
#endregion - General -
/// <summary>
/// 命令栏文本改变时触发
/// </summary>
private void CmbCommand_TextChanged(object sender, EventArgs e)
{
LblClearFilter.Visible = CmbCommand.Text.Length > 0;
}
/// <summary>
/// 点击清空命令栏标签时触发
/// </summary>
private void LblClearFilter_Click(object sender, EventArgs e)
{
CmbCommand.Text = "";
}
}
}