Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Hide row layout in a window

Hide row layout in a window

Anonymous
Not applicable
645 Views
2 Replies
Message 1 of 3

Hide row layout in a window

Anonymous
Not applicable

Hi everyone!

 

I'm programming a user interface window for a plug-in and I need to hide a row layout when I press an icon text button. Does anyone know how to do it?

 

 

Thanks!

0 Likes
Accepted solutions (1)
646 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Accepted solution

You only have to call the rowLayout command (http://help.autodesk.com/cloudhelp/2017/ENU/Maya-Tech-Docs/Commands/rowLayout.html)

with -e  (for edit) and -visbile. Finally the name of the rowLayout:

rowLayout -e -visible false "NAME";

To read the value you have to specify -q (for query) instead of -e

int $visiblity = `rowLayout -q -visible "NAME"`;

 

 

global proc OnMakeRowInvisible(string $rl)
{
   rowLayout -e -visible false $rl;
}

global proc ShowWindow()
{
	string $sWindow = `window -title "TestWindow"
		-widthHeight 300 112`;
    
    columnLayout;
       rowLayout -numberOfColumns 2 MyRowLayout;
            text -label "TestA";
            text -label "TestB";
       setParent ..;
       
       string $cmd = "OnMakeRowInvisible(\"MyRowLayout\")";
       print $cmd;
       button -label "Make Invisible" -width 150 -command $cmd;
       button -label "Cancel" -width 150 -command ("deleteUI -window " + $sWindow);
    setParent ..;
    
	showWindow $sWindow;
}

ShowWindow()

Hope it helps you.

 

Message 3 of 3

Anonymous
Not applicable
That was what I've been looking for all these days! Thank you very much! 😄
0 Likes