Skip to main content
16-Pearl
April 15, 2020
Question

making a sidebar swipe in and out

  • April 15, 2020
  • 1 reply
  • 2347 views

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

 

 

sidebar.JPG

1 reply

14-Alexandrite
April 16, 2020

Hi,

usually that should work.

Can you share your code to set it invisible and your item tree?

 

Thanks.

whity16-PearlAuthor
16-Pearl
April 16, 2020

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.

sidebar2.JPG

14-Alexandrite
April 16, 2020

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:

snip.PNG