本文介绍了Checklist框中的SelectedIndexChanging事件在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我似乎在Windows窗体控件检查列表"中找不到SelectedIndexChanging事件.有什么方法可以在selectedIndexChanged之前获取事件或告诉以前的选定索引是什么?
感谢
Hi,
I can''t seem to find the SelectedIndexChanging event on Windows form control Check Listbox. Is there any way to get the event before the selectedIndexChanged or tell what the previous selected index was?
Thanks
推荐答案
private void checkedListBox1_ItemCheck(object sender, ItemCheckEventArgs e)
{
if (e.NewValue == CheckState.Checked)
{
//You can save the selected item into databse
//Yor Popup should comes here...
MessageBox.Show("Selected item is: " + checkedListBox1.Text);
}
else
{
//you can remove the item from database
}
}
如有任何疑问,请让我知道.
如果对您有帮助,请提供投票.
谢谢,
Imdadhusen
Please do let me know, if you have any doubt.
Please provide Vote if this would be helpful to you.
Thanks,
Imdadhusen
这篇关于Checklist框中的SelectedIndexChanging事件在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!