Move checkboxlist from one groupbox to another groupbox for windows form using c# -
this form created using windows application under menu1 have submenus on click of submenu have display checkboxlist in groupbox on click of checkbox , click of move button list of command should displayed on other groupbox , have buttons "delete" , "clear" on click of delete button selected command should deleted list , click of clear button list command displayed should cleared groupbox , want display number selected checkboxlist in message box windows form using c#
can any1 me on this.. please provide me code aslo....
regards, sweety
let's have [chklist1 : first checklistbox] , [lstbox1 : destination]
btnadd, btndel, btnclear
private void btnadd_click(object sender, eventargs e) { foreach (var item in chklist1.selecteditems) { if (!lstbox1.items.contains(item)) lstbox1.items.add(item); } } private void btndel_click(object sender, eventargs e) { foreach (var item in lstbox1.selecteditems) { lstbox1.items.remove(item); } } private void btnclear_click(object sender, eventargs e) { lstbox1.items.clear(); //if want hide lstbox you'll write //lstbox1.visible = true; }
Comments
Post a Comment