cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

making a sidebar swipe in and out

whity
16-Pearl

making a sidebar swipe in and out

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

5 REPLIES 5
sebben
12-Amethyst
(To:whity)

Hi,

usually that should work.

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

 

Thanks.

whity
16-Pearl
(To:sebben)

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

sebben
12-Amethyst
(To:whity)

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

 

whity
16-Pearl
(To:sebben)

This is my hierachy:

whity_0-1587019566800.png

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.

 

whity_1-1587019662197.png

 

 

sebben
12-Amethyst
(To:whity)

You can try to put your gridLayout in a Panel and hide the Panel instead.

Top Tags