PDA

View Full Version : Scrollbar to the ExtJS 3.2 panel



vmacias1216
6 Apr 2010, 9:03 AM
Para usar temas con la scroll bar yo estoy usando este código, si estoy bien... :Dbacan:D, sino avisen????

<head runat="server">
<title>Ext Buttons</title>

<link rel="stylesheet" type="text/css" href="Libs/resources/css/tutorsty.css" />
<link rel="stylesheet" type="text/css" href="Libs/resources/css/flexcrollstyles.css" />
<link rel="stylesheet" type="text/css" href="Libs/resources/css/reset-min.css"/>
<link rel="stylesheet" type="text/css" href="Libs/resources/css/ext-all.css"/>
<link rel="stylesheet" type="text/css" href="Libs/resources/css/xtheme-blue.css"/>

<script type="text/javascript" src="Libs/flexcroll.js"></script>
<script type="text/javascript" src="Libs/prototype.js"></script>
<script type="text/javascript" src="Libs/adapter/prototype/ext-prototype-adapter.js"></script>
<script type="text/javascript" src="Libs/ext-all.js"></script>
<script type="text/javascript">
Ext.BLANK_IMAGE_URL = 'Libs/resources/images/default/s.gif';

Ext.override(Ext.Component, {
afterRender: function() {
if (Ext.isDefined(this.body)) {
CSBfleXcroll.defer(1, window, [this.body.dom]);
}
}
});

var html = [
'<h1>Heading One</h1>',
'<h2>Heading Two</h2>',
'<p>This is a paragraph with <strong>STRONG</strong>, <em>EMPHASIS</em> and a <a href="#">Link</a></p>',
'<table>',
'<tr>',
'<td>Table Column One</td>',
'<td>Table Column Two</td>',
'</tr>',
'</table>',
'<ul>',
'<li>Un-ordered List-item One</li>',
'<li>Un-ordered List-item One</li>',
'</ul>',
'<ol>',
'<li>Ordered List-item One</li>',
'<li>Ordered List-item Two</li>',
'</ol>',
'<blockquote>This is a blockquote</blockquote>'
];

Ext.onReady(
function() {
Ext.QuickTips.init();

fp = new Ext.Panel({
title: 'A Panel with W3C-suggested body-html styling',
preventBodyReset: true,
height: 200,
width: 300,
autoScroll: true,
html: html.join('')
})

fp.render(document.body);
//
//
}
);
</script>
</head>

vmacias1216
6 Apr 2010, 1:06 PM
Con esto logre poner tema al scroll de las GridView:

Ext.override(Ext.grid.GridPanel, {
listeners: {
viewready: function(sender) {
if (Ext.isDefined(sender.getView().scroller)) {
if (!Ext.isDefined(sender.getView().scroller.dom.fleXdata)) {
CSBfleXcroll(sender.getView().scroller.dom);
}
}
}
}
});