running in 3ds max 2011 and I am having trouble getting A dotnet Button to disappear by setting the .visible property to false. I’m completely new to dotNet so forgive me if its an easy fix.
No worries. Working with dotNet can be a bit confusing at first. Try this out in your code:
To make it visible:
myButton.Visibility = (dotNetClass "System.Windows.Visibility").Visible
To make it invisible:
myButton.Visibility = (dotNetClass "System.Windows.Visibility").Collapsed
Hi, just “solved” a similar problem:
Problem
I’ve a Maxscript-Rollout and a DotNet-Listbox in it. I wanted the Listbox to appear/disappear by setting .visible = true/false but the Listbox didn’t changed any visibility (but when it was hidden, i couldn’t click in it)!
Solution
The problem is, that the Maxscript-Rollout isn’t refreshed (so it’s not a problem of the DotNet control i guess). Since there’s no rollout.update() function, you can just resize the rollout (rollout.width+=1) and you’ll see that the DotNet-Listbox disappears/appears. I wrote a updateUI-function which just increases the rollout-width about 1px and decreases it immidiatelly after that again.
Hope this helps some guys.