开发者

Windows ListView with CheckBoxes

开发者 https://www.devze.com 2023-01-06 22:41 出处:网络
I have a ListView Control in WindowsForm and also this Listivew has a checkBoxI Just want one thing that when userClick on CheckBox I want this Event

I have a ListView Control in WindowsForm and also this Listivew has a checkBox I Just want one thing that when userClick on CheckBox I want this Event I used ItemCheck and ItemChecked Event but these event is firing every time even when Firstime 开发者_JAVA技巧my form is loading


The Listview control fires itemcheck and itemchecked (and some other) events sometimes at initialization, provided "by design" by Microsoft at no extra charge. You can set a flag (boolean variable) to tell whether the form has completed the loading process, and abort the handler if not.


Add the following line to the top of your event handler:

if (!this.Visible) return;
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号