Multiple selection on Tree Control
-
I downloaded a project from codeproject that makes multiple selection posibible on a CTreeCtrl. The link is: [^] The downloaded project works fine, I mean it works to select multiple lines with the Ctrl key. I created a project on my own, taking from the downloaded project just CCustomTreeCtrl files, because I need just CCustomTreeCtrl. So, my problem is that it does not work to select multiple lines in the tree control in my project, but in the downloaded project it does. How can this be? I cannot figure it out. I checked and double checked to see if there's any notable difference, and I can't see any.
-
I downloaded a project from codeproject that makes multiple selection posibible on a CTreeCtrl. The link is: [^] The downloaded project works fine, I mean it works to select multiple lines with the Ctrl key. I created a project on my own, taking from the downloaded project just CCustomTreeCtrl files, because I need just CCustomTreeCtrl. So, my problem is that it does not work to select multiple lines in the tree control in my project, but in the downloaded project it does. How can this be? I cannot figure it out. I checked and double checked to see if there's any notable difference, and I can't see any.
At first glance, that article seems to be more geared towards rubber banding a selection. While Ctrl+Click may work, too, there may be extra code there that is messing you up. Perhaps you could use Paul DiLascia'c code from here, or a related article (alas with more features) from here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
At first glance, that article seems to be more geared towards rubber banding a selection. While Ctrl+Click may work, too, there may be extra code there that is messing you up. Perhaps you could use Paul DiLascia'c code from here, or a related article (alas with more features) from here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
At first glance, that article seems to be more geared towards rubber banding a selection. While Ctrl+Click may work, too, there may be extra code there that is messing you up. Perhaps you could use Paul DiLascia'c code from here, or a related article (alas with more features) from here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
I tried the code from the second link. It behaves the same as the code from Syed Babu from codeproject. If I select multiple items using Ctrl and left mouse button it selects JUST THE LAST 2 previously selected items; the first item selected in a row of three is always deselected. I don't get it, I have the same code as the original code. There's something strange here.
-
At first glance, that article seems to be more geared towards rubber banding a selection. While Ctrl+Click may work, too, there may be extra code there that is messing you up. Perhaps you could use Paul DiLascia'c code from here, or a related article (alas with more features) from here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
The code looks fine actually. Can you elaborate the problem you are facing in this code?
mohsinmunawar [at] gmail [dot] com
-
The code looks fine actually. Can you elaborate the problem you are facing in this code?
mohsinmunawar [at] gmail [dot] com
The code I'm refering to is from here: http://www.codeguru.com/cpp/controls/treeview/misc-advanced/article.php/c723/Allowing-multiple-selection.htm[^] There's not much to elaborate. I just took this code, all these functions, and put them in my CTreeCtrlXML class which is derived from CTreeCtrl. And I have the problem I wrote above. I have the same exact problem by using the Syed Babu code from here: MultiSelection Tree Control[^]
-
The code looks fine actually. Can you elaborate the problem you are facing in this code?
mohsinmunawar [at] gmail [dot] com
-
I cannot attach the two projects here. I don't see any attach button. Can I send you on a private mail the two projects and have a quick look, please?
Sure that will be great. My email address is: mohsinmunawar [at] gmail [dot] com