Dynamic Change Between Single/Multi select i CListCtrl
-
Hello all, I have a problem with my app. i have a CListCtrl where i need to change between Multiple selected and single selected with a check box. I have been looking through the articles but didnt find anything. Can anyone help me please? In advance thanks, Michael Olsen
-
Hello all, I have a problem with my app. i have a CListCtrl where i need to change between Multiple selected and single selected with a check box. I have been looking through the articles but didnt find anything. Can anyone help me please? In advance thanks, Michael Olsen
I am assuming the CListCtrl is similar in this regard to the CListBox. If anyone knows of a good way to do this with CListCtrl, I want to know too. But I do know you can't do it with a listbox. The Windows designers apparently never figured that someone might want to switch between single select and multiple select at run-time... So your options are as follows: :bob: Create *two* list controls, right on top of each other, one is a Multiselect, the other is a Single select. Show only the one you want at any given time. Whenever you change between Single and Multiple select, show the appropriate list, and synchronize the contents. The disadvantage is that functions that do something to the list control have to be smart enough to know which one to use... or you have to make a wrapper class around the list controls to handle it. :bob: Create a custom control, or derive a new control from CListCtrl and do the rest of the functionality manually. Then post it on CP as an article. :-D You can pick your friends, and you can pick your nose, but you can't pick your friend's nose.
-
Hello all, I have a problem with my app. i have a CListCtrl where i need to change between Multiple selected and single selected with a check box. I have been looking through the articles but didnt find anything. Can anyone help me please? In advance thanks, Michael Olsen