PDA

View Full Version : Scrollbars for buttons that are hidden



samshu
15 Sep 2010, 1:49 AM
I have 3 buttons that I add to a panel dynamically. When I resize the panel, the buttons are hidden. Is there a way to provide scrollbars so that I could scroll to view the hidden buttons?

laurentParis
15 Sep 2010, 4:13 AM
Can you give us test environnement && / || code, thanks

samshu
15 Sep 2010, 4:29 AM
I've tried it in all browsers over Windows, it behaves the same way. Here's the sample code on how I add the buttons.

new Ext.FormPanel({
layout: 'fit',
url : '',
id : 'formPanel',
renderTo : 'samForm',
frame : true,
title : "Sample Form",
items : [
{
xtype: 'textfield',
fieldLabel : 'Name',
name : 'fName',
id : 'fName',
width : 150,
emptyText : 'Enter your name here'
}],fbar : [{
xtype : 'button',autoWidth : true,id:'but1',
text : 'Hello This is a button, Ah! this is a failiure, Now lets see if we get a horizontal scrollbar when the panel itself is in a fit layout!'
},{
xtype : 'button',id:'but2',
text : 'Test this button to check if a scrollbar occurs when the browser is resized beyond the width which can accomodate the buttons'
}]
});.
I've just created 2 buttons with large text. The second button's text gets hidden.