dotnet button visible
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
Comments
Update Rollout
You Can use this Function after changing the visibility of dotNetControls
Thanks to Simont
http://discourse.techart.online/t/maxscript-dotnet-cant-get-button-to-di...
but also you need to change its size coz the space will still occupied with it
Youtube, Gumroad
Thanks for your reply
Thanks for your reply Barigazy.
I didn't understand it at first but a bit of research after... Yes it works like a charm !
A big thanks :)
...
Use .net panel as dotnet control and add .net button inside.
.net button must be dotnet object
bga