English 中文(简体)
Combo box inside of list control? (Unmanaged C++)
原标题:

I m using unmanaged C++ and I was wondering if I could embed a combo box inside a column of my List View. I have tried googling for information, however I keep finding C# articles on the subject.

It seems like the LVCOLUMN s mask can support text and images but I am not finding anything about controls.

Any ideas on the subject would be great.

最佳回答

You can create a floating combo box and position it over the selected row and column of the list control. You ll need to trap all selection related operations on the list control and show, hide, or move and update the contents of the combo box.

问题回答

You could also look at some 3rd party controls which allow this (it s not really supported in the default MS common controls). For example, the Ultimate Grid allows this sort of thing. It s not well supported, but it is open source, so if nothing else it might provide some reference for what would be involved in building it.

There are probably also other commercial vendors for these controls, but I m not going to recommend anything in particular (you can always google/etc.).

I was looking into this recently. If you want it to fit into the correct space then your only option, as far as i could work out, is to create your own combo box control. Its not difficult to do and gives good results :)





相关问题
WPF Datagrid, Setting the background of combox popup

I would like to change the color of the popup background when using a DatagridComboboxColumn in the WPF Toolkit datagrid. I ve edited the Template for a normal Combobox and it works great for selected ...

How to insert ComboBox item into ListBox? [winforms]

The question is very simple, How to insert ComboBox selected item into ListBox using c#? I have tried with this: listbox.Items.Add(combobox.SelectedItem); and some other permutations but it always ...

How do I bind a ComboBox to a one column list

I ve seen how to bind a ComboBox to a list that has columns like this: ItemsSource="{Binding Path=Entries}" DisplayMemberPath="Name" SelectedValuePath="Name" SelectedValue="{Binding Path=Entry}" But ...

Wpf Combobox Limit to List

We are using Wpf Combobox to allow the user to do the following things: 1) select items by typing in the first few characters 2) auto complete the entry by filtering the list 3) suggesting the first ...

热门标签