当用户点击“否”时,无论如何都会取消选中checkedListBox1项目,实施此类确认的正确方法是什么?
private void checkedListBox1_ItemCheck(object sender, ItemCheckEventArgs e)
{
if (e.NewValue.ToString() == "Unchecked")
{
//Confirmation
if (MessageBox.Show("Really Remove?","Remove", MessageBoxButtons.YesNo, MessageBoxIcon.Question,MessageBoxDefaultButton.Button2) == System.Windows.Forms.DialogResult.No)
{
return;
}
}
答案 0 :(得分:0)
您可以尝试以下内容:
pip install mysqlclient