Using enter key to check CheckBoxes in C#.NET -


I want to use the enter instead of space to check the check box.

  Private Zero form2_keydown (Object Sender, KeyVenture EG) {checkbox C1 = this. Active Controls as checkboxes; If (E. Kedata == Key.Inter & amp; it. ActiveControl.qualz (C1)) c1. Check = true; }  

I can do this if I write this code in KyeUp in the checkbox, but the thing is that I have many checkboxes in the form and I can write it under each of my keyboards So, I have to use the key below to use it. Why do I need to change ??

Set the form's property to correct.

Alternatively, you can loop through the checkbox (using the Controls property, perhaps again rotating) and add the same handler to each checkbox. / P>


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -