c# - How to hide specific item from a combo box in win forms -
how can hide specific number of items combo box. code below hide items instead. couldn't find way perform this
string taskselection = taskselectioncombobox.text; string stateofchild = stateofchildcombobox.text; if (stateofchild == "awake") { taskselectioncombobox.hide(); }
you need store items want use remove method delete them. can use add make them back.
// keep items in list list<string> list = new list<string>(); list.add("awake"); // remove them combobox combobox1.items.remove("awake"); // if want add them again. combobox1.items.add(list[0]);
Comments
Post a Comment