如何在C#中的组合框内添加复选框 [英] How to add check box inside combobox in c#

查看:211
本文介绍了如何在C#中的组合框内添加复选框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在C#中的comboBox内添加复选框。我的目的是用户可以从一个ComboBox中选择多个值(全部选中和全部取消选中)。

I want to add check box inside comboBox in C#. My purpose is that the user can select multiple values from one ComboBox ( Check all and Uncheck all ).

请帮助

推荐答案

您必须通过提供自己的呈现策略并手动添加一个CheckBox来扩展ComboBox控件。

You have to extend the ComboBox control by providing your own rendering strategy, and "manually" adding a CheckBox.

这些开源项目随时可以使用:

Theses open source project are ready to use :

http://www.codeproject.com/KB/combobox/CheckComboBox.aspx
http://www.codeproject.com/KB/combobox/extending_combobox.aspx

这篇关于如何在C#中的组合框内添加复选框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆