Discuss anything related to web development but no technical support questions


Post by fredmalenfant »

I try different way to render the gantt in a div and have the with automatically adjusted when I resize my window.

I play with these settings:

ganttPanel = Ext.create('Gnt.panel.Gantt', {
// layout: 'fit',
height:500,
width:'auto',
...

I also set this property:
Ext.EventManager.onWindowResize(ganttPanel.doLayout, ganttPanel);

the container is set like that:
<div id="divGantt" style="width: auto; height: auto; padding: 25px;"></div>

If I set width to auto and height to 500, it works well. But, I also want my height to be "auto" size.

So, I set layout to "fit", and I do not set the height.
When I do that, it renders perfectly on the correct size and height (I do not need to set the width too).
But, the "resizer" that is between the grid and the list is not visible. I can't resize the grid zone from left to right.

I would like to set the layout to fit, to get the perfect size of my gantt, and being able to resize the grid zone with the slider.

Post by mats »

I'm not sure this is supported for locking grid, since this is only related to Ext.Component features I think you'll get better support in the Sencha forums. https://www.sencha.com/forum

You could also manually call setWidth and specify the width you want after a window resize.

Post Reply