Hybrid View
-
7 Jan 2013 10:51 PM #1
Container is not be filled 100 percent by a toolbar
Container is not be filled 100 percent by a toolbar
I have a container object in view port, i set the layout 'fit', then i render a toolbar to this container, when this container is rendering, i put these codes in this event:
Ext.create('Ext.toolbar.Toolbar', {
renderTo: 'cntMainMenu',
items: [
{
xtype: 'button',
text: 'Panel Show'
},
{
xtype: 'button',
text: 'Temp Show'
}
]
});
This toolbar's buttons can not be loaded successfully. When I set toolbar's width attribute a exact number, these buttons be loaded successfully, but this container is not be filled 100 percent, what can do ?
02.png
-
8 Jan 2013 11:26 AM #2
Perhaps you should show a picture of what you're trying to achieve...
You will need to set a width to the toolbar if you are using the renderTo configuration.Aaron Conran
@aconran
Sencha Architect Development Team
-
9 Jan 2013 12:58 AM #3
I need to put a combobox on a container, I have to use 'renderTo' atrribute, I want this combobox to be resized when the contianer is resized. what should i do?
-
9 Jan 2013 12:54 PM #4
Start an Ext Project
Drag out a Panel
Put the Combobox into the Panel
Set the layout of the Panel to 'anchor'
Set the Combobox anchor configuration to '100%'
Resize the Panel and you'll see the combo adapts to the panel...Aaron Conran
@aconran
Sencha Architect Development Team
-
9 Jan 2013 4:16 PM #5
Thanks for you help.
I did it as you said, but i need this panel/ container render to another container 'ControllerA'. When I am resizing
'ControllerA', the combobox is not resized.
Below is the code, I want to render this panel to another container.
Ext.define('app.view.Page.P4', {
extend: 'Ext.panel.Panel',
alias: 'widget.pagep4',
layout: {
type: 'anchor'
},
title: 'P4',
initComponent: function() {
var me = this;
Ext.applyIf(me, {
items: [
{
xtype: 'combobox',
anchor: '98%',
fieldLabel: 'Label'
}
]
});
me.callParent(arguments);
}
});
-
10 Jan 2013 8:42 AM #6
How are you resizing it?
Have you put Page.P4 in as an item of this container?Aaron Conran
@aconran
Sencha Architect Development Team


Reply With Quote