PDA

View Full Version : DotNet TreeView Multiple select?


Jon-Huhn
12-21-2007, 06:52 PM
I'm not very familiar with dotNet or the dotNet treeview control, but I did just run the one provided in the Maxscript help files.

Looks like in that control, you can't select multiple nodes at once. Is there any way to modify it so that you can?

Thanks!

RustyKnight
12-21-2007, 10:47 PM
I'm not very familiar with dotNet or the dotNet treeview control, but I did just run the one provided in the Maxscript help files.

Looks like in that control, you can't select multiple nodes at once. Is there any way to modify it so that you can?

Thanks!Short answer, no...for some reason, Microsoft didn't seem to think this feature was important...

Long anser...yes, but you will need to code it yourself or download one the implementations on the net...this would be okay if you intend not to share the script, but a real bummer if you do...

Shane

edt: https://sourceforge.net/projects/mstreeview

Jon-Huhn
12-21-2007, 11:18 PM
When you say I'd need to code it myself, are you saying that it can be done in Maxscript, or that it needs to be implemented externally somehow?

RustyKnight
12-22-2007, 05:10 AM
When you say I'd need to code it myself, are you saying that it can be done in Maxscript, or that it needs to be implemented externally somehow?Sorry, I should have explained myself a little better...

No it can't be done in max - from what I've read. The dotnet control simply does not provide the required support...for some reason...

You would either need to download one of the other extentions of the control that do provide the support or write your own, in C++/C#

How well this would fit back into max, I'm not fully aware, but since I believe some one wrote a listview sorter in C# and presented it here I would imagine it would be possible.

The immediate issue I see with it though, is you will need to distribute the "extra" control along with your script, which is just another hassel for the end-user...:P

Shane

Pjanssen
12-22-2007, 09:14 AM
You would either need to download one of the other extentions of the control that do provide the support or write your own, in C++/C#

How well this would fit back into max, I'm not fully aware, but since I believe some one wrote a listview sorter in C# and presented it here I would imagine it would be possible.

Works without any problems. The one you linked is a very nice one. The only thing you might want to do is download the source and fix the editlabel focus bug.
For an example of it's use, take a look at my outliner tool.


The immediate issue I see with it though, is you will need to distribute the "extra" control along with your script, which is just another hassel for the end-user...:P
Shouldn't be much of a hassle really. You can just put it in the same directory as the script, and have the script load it.

Jon-Huhn
12-22-2007, 10:55 AM
Great!! Thanks everyone for your replies!

PEN
12-22-2007, 02:08 PM
You can also mock this up in MXs by tracking what has been selected and color the elements to makeit look like they are selected. Just store all the elements that you clicked on it an array and work on that.

Pjanssen
12-22-2007, 04:26 PM
You can also mock this up in MXs by tracking what has been selected and color the elements to makeit look like they are selected. Just store all the elements that you clicked on it an array and work on that.
What I'm wondering about is, how would you avoid the removing of the bg coloring when a node is deselected? Because the treeview resets a node bg color after the 'afterselect' event is fired.

PEN
12-24-2007, 04:37 PM
re-color all the nodes that you have collected then.

Pjanssen
12-25-2007, 07:56 AM
That can be very slow when you've got a large selection.

CGTalk Moderation
12-25-2007, 07:56 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.