You’re defining SelectSO in a local scope. So the callback cannot access this variable. Adding this before the rollout definition should help: global…
The difference between dotnetcontrol tvObj “System.Windows.Forms.TreeView” and local tvObjs = dotNetObject “System.windows.forms.treeview” is not …
If it’s not printing anything, then it’s probably not even being called. I just tried the code I wrote, there was an error in there indeed (I forgot t…
I’d suggest to use the TreeNodeCollection.Find method to get the selected treenodes. This function basically does the same thing as you do, but its bu…
Looking at the code, I assume that having this line in the “childOfRootnodes” function would check all nodes except those on the lowest level: for i=…
Yeah if you just want to change the colour of the node, then it seems a bit inefficient to refresh the entire tree. If you’re hiding the selected node…
sumchans: What happens is when i click a layer and hit the Hide layer button, the function works well but the treeview control scrolls down to the b…
Check out the help topic on NodeEventCallback, there is an explanation of it and code examples in there. Maybe you could post the code that demonstrat…
The NodeEventCallback class will help you there. I assume that by “refreshing the treeview” you mean removing all nodes and then adding them again? Yo…
Here’s a function to get you started. It checks if the provided node b is above node a in its hierarchy. function isParentOf a b = ( if (not (isVali…
If “roll” is the name of the dialog, then it is fine: on <item_name> <event_name> [ <argument> ] do <expr>
At first glance it seems odd to have the if and case statements in parentheses, but that might not be the cause of the syntax error.
Have a look at this function to find if a menu item already exists: <Interface>menuMan.findMenu <string>menuName You’ll probably want to…
Alright, some further oddness. First of all, callback functions in a struct don’t seem to have access to other struct members unless the instance is s…
Hihi, no maxscript agrees with you, there is a .enabled property! However, I just noticed that this problem does not seem to be caused by the destruc…