ExtJS Viewport issue
Hi I am designing a viewport.
How can I set only the vertical scrollbar for the viewport?
I am using the style: overflow-x: hidden; overflow-y: auto;
开发者_运维技巧, for vertical scroll in the view port.
Here's some simple Ext.JS that will give you a Viewport with a single component inside it (using the Fit layout) that scrolls vertically (including some content that should be tall enough to make the scroll bar appear):
Ext.onReady(function(){
new Ext.Viewport({
layout: "fit",
defaults: {autoScroll: true},
items: [{
html: "<p>demo</p><p>demo</p><p>demo</p><p>demo</p><p>demo</p>" +
"<p>demo</p><p>demo</p><p>demo</p><p>demo</p><p>demo</p>" +
"<p>demo</p><p>demo</p><p>demo</p><p>demo</p><p>demo</p>" +
"<p>demo</p><p>demo</p><p>demo</p><p>demo</p><p>demo</p>" +
"<p>demo</p><p>demo</p><p>demo</p><p>demo</p><p>demo</p>" +
"<p>demo</p><p>demo</p><p>demo</p><p>demo</p><p>demo</p>" +
"<p>demo</p><p>demo</p><p>demo</p><p>demo</p><p>demo</p>" +
"<p>demo</p><p>demo</p><p>demo</p><p>demo</p><p>demo</p>" +
"<p>demo</p><p>demo</p><p>demo</p><p>demo</p><p>demo</p>" +
"<p>demo</p><p>demo</p><p>demo</p><p>demo</p><p>demo</p>"
}]
})
});
精彩评论