开发者

Native CheckedListBox?

开发者 https://www.devze.com 2023-02-02 09:34 出处:网络
In .NET land, there\'s the tremendously useful System.Windows.Forms.CheckedListBox class. What is the equivalent in Window开发者_运维知识库s Common Controls land? (if any)Turn a list view into one wi

In .NET land, there's the tremendously useful System.Windows.Forms.CheckedListBox class.

What is the equivalent in Window开发者_运维知识库s Common Controls land? (if any)


Turn a list view into one with checkboxes. If you want it similar to a ListBox, only use 1 column.

ListView_SetExtendedListViewStyle (handle, LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT);


Almost identical UI can be developed with the List View control by using item state images.

But selection management and other functionalities need to be implemented manually.


This article might be of interest for you. In short windows allows quite easily to implement checkboxes in Listbox and combobox through custom drawing and messaging.

0

精彩评论

暂无评论...
验证码 换一张
取 消