PDA

View Full Version : Can't get horizontal scrollbar to show on a grid inside a VBOX layout



tm8747a
31 Oct 2013, 5:55 AM
Here's a fiddle illustrating the problem: https://fiddle.sencha.com/#fiddle/1a8

Notice the maxHeight: 200 set on the grid. If I change that to just height, the horizontal scrollbar shows up. But I'd strongly prefer to not set a static height. I'd even be open to forcing it, but I tried setting scroll: 'horizontal' on the grid and nothing happens. Is there any way to get this working so that horizontal scrollbars will show on the grid, other than forcing a fixed height? Also bear in mind that I need to use a liquid width as well for the panels.

Gary Schlosberg
2 Nov 2013, 11:01 AM
This is a known issue and is fixed. Your test case has a scrollbar in 4.2.2 as expected. I noticed that minHeight (http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.grid.Panel-cfg-minHeight) configuration also forces the scrollbar in 4.2.1, so perhaps that help you work around until you can upgrade.

tm8747a
4 Nov 2013, 4:12 AM
This is a known issue and is fixed. Your test case has a scrollbar in 4.2.2 as expected. I noticed that minHeight (http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.grid.Panel-cfg-minHeight) configuration also forces the scrollbar in 4.2.1, so perhaps that help you work around until you can upgrade.

OK, guess I'll have to upgrade. I tried adding minHeight to the fiddle, it didn't work.

Gary Schlosberg
4 Nov 2013, 10:22 AM
Yes, sorry, I tried it with 200. It looks like minHeight only works (to force the horizontal scrollbar) when that minimum height is larger than that of the rows, making the setting no more useful than setting the height (http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.grid.Panel-cfg-height).