How to insert a check box inside a list box in C#?

前端 未结 2 559
盖世英雄少女心
盖世英雄少女心 2021-01-21 15:26

I want a code to insert a checkbox inside a listbox in c sharp. on selecting the checkbox all the items in listbox must get selected.

2条回答
  •  伪装坚强ぢ
    2021-01-21 16:07

    Maybe you could extend the mentioned CheckedListBox, and handle a few Events so that only the first CheckBox is visible (maybe some kind of formatting event would be good for that).

    And don't forget to use the onCheckedChangeEvent, so that you (de-)select all elements on change of the checkbox-value.

提交回复
热议问题