Pjanssen
@pjanssen
New Member
Joined: Feb 14, 2024
Topics: 53 / Replies: 510
Reply
RE: change selection listner on rollout

You’re defining SelectSO in a local scope. So the callback cannot access this variable. Adding this before the rollout definition should help: global…

15 years ago
Forum
Reply
RE: Treeview node checking on formload

The difference between dotnetcontrol tvObj “System.Windows.Forms.TreeView” and local tvObjs = dotNetObject “System.windows.forms.treeview” is not …

15 years ago
Forum
Reply
RE: Treeview node checking on formload

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…

15 years ago
Forum
Reply
RE: Treeview node checking on formload

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…

15 years ago
Forum
Reply
RE: Treeview node checking on formload

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=…

15 years ago
Forum
Reply
RE: Help with callbacks and dotnet treeview control.

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…

15 years ago
Forum
Reply
RE: Help with callbacks and dotnet treeview control.

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…

15 years ago
Forum
Reply
RE: Help with callbacks and dotnet treeview control.

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…

15 years ago
Forum
Reply
RE: Help with callbacks and dotnet treeview control.

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…

15 years ago
Forum
Reply
RE: How to verify hierarchy?

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…

15 years ago
Forum
Reply
RE: Script works fine on 2011 not on 2009

If “roll” is the name of the dialog, then it is fine: on <item_name> <event_name> [ <argument> ] do <expr>

15 years ago
Forum
Reply
RE: Script works fine on 2011 not on 2009

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.

15 years ago
Forum
Reply
RE: startup script keeps opening toolbars

Have a look at this function to find if a menu item already exists: <Interface>menuMan.findMenu <string>menuName You’ll probably want to…

15 years ago
Forum
Reply
RE: NodeEventCallback issues

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…

15 years ago
Forum
Reply
RE: NodeEventCallback issues

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…

15 years ago
Forum
Page 19 / 38