Hi everyone
I'm trying to toggle the visibility of a dotnet button inside a maxscript dialog, but I don't find how to get it work so far...
her's my code for now:
try (destroyDialog TestRoll) catch()
Rollout TestRoll "TestRoll"
(
dotNetControl Btn1 "system.windows.forms.button" width:50 height:50 pos:[5,5]
button Btn2 "toggle visible"
on testRoll open do
(
local logoImg = dotnetObject "System.Drawing.Bitmap" @"C:\bitmap.jpg"
Btn1.image = logoImg
Btn1.Visible = false
)
on Btn2 pressed do mmBtn1.Visible = true
)
createDialog TestRoll style:#(#style_toolwindow, #style_sysmenu)
So for me the dotnet button should not be visible while the dialog open and should appears when I clic on btn2.
However when the dialog open, Btn1 is white and when I click on Btn2, the Btn1 shows the pictures, while I need the button to be hide or visible (with the picture)
Thanks in advance for any help
By SugaR · 2013-10-11
barigazy · 2013-10-11