PDA

View Full Version : Toolbar - buttons stay on the same location when resizing the toolbar



dekely
24 Sep 2013, 6:55 AM
Hi All,
I have a toolbar with tbfill and one button, when I resize the IE I expect the button to move as well.
Here is an example:



<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Example</title>
<link type="text/css" rel="stylesheet" media="all" href="extJS_/resources/css/ext-all.css" />



<script type="text/javascript" src="extJS_/ext-all.js"></script>
</head>
<body>




<script type="text/javascript" >


Ext.onReady(function(){



Ext.create('Ext.toolbar.Toolbar', {
renderTo: document.body,
width : '100%',
height: 55,
border:false,
defaults:{
height: '100%',
margin: '2',

bodyStyle : 'background:none' // Removes the default white background
},
items: [
{xtype: 'tbfill'},
{
xtype:'button',
height: 24,
width: 24,
icon: 'https://cdn2.iconfinder.com/data/icons/flat-style-svg-icons-part-1/512/phonebook_phone_vector_book-20.png'
}
]
});

});


</script>


</body>
</html>

dekely
24 Sep 2013, 7:08 AM
Additional info:
My toolbar is inside a viewport, i see the toolbar resizing but not the buttons inside.

dekely
24 Sep 2013, 10:18 AM
well, it works now.
my panel was inside an iframe, I removed it and added it directly to the panel.

Gary Schlosberg
25 Sep 2013, 3:58 PM
Glad to hear you got it resolved, and thanks for sharing your solution back with the community.