Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Hi everyone,
I have a 2D Project and want to make a "sidebar" that can be reduced by a button or be displayed again. I have a column, that contains a grid-layout, where all my buttons and labels are in. Clicking on the button "<" the grid layout's visibility is set to false, but the column stays at place.
Does anyone know how to make it disappear?
Cheers
whity
Hi,
usually that should work.
Can you share your code to set it invisible and your item tree?
Thanks.
Hi sebben,
the code is quite short:
$scope.HideSidebar = function () {
sidebarswitch=!sidebarswitch;
$scope.view.wdg['gridLayout-2'].visible=sidebarswitch;
}
This is, what the sidebar looks like when gridlayout-2 is invisible, I would like to have the white area disappear and the "< " button to move to the very left.
It would be helpful to see your item tree or hierarchy as well. Also. are you using css? Then you probably have to change some properties there too. I got this working with a hierarchy like this without css:
This is my hierachy:
gridLayout-2 from column-1 is mad invisible. The thing is, that column-1 is still there as white space. I would change the with of the column by code, but I can't find a way to access it.
I us some css, but not for the columns or the grids right now.
You can try to put your gridLayout in a Panel and hide the Panel instead.