PDA

View Full Version : [CLOSED] Buttons property missing from Window



froamer
9 Mar 2012, 4:28 AM
Designer version tested: Designer 2.0.0 build 309
Operating System: Mac OSX Lion
Framework: Ext JS 4.x

Description:
The designer does not include the buttons property: Ext.window.Window > buttons (http://docs.sencha.com/ext-js/4-0/#!/api/Ext.panel.Panel-cfg-buttons)

You can add the buttons property manually to a Window with...


buttons: [{ text: 'Button 1' }]

but then the buttons need to be edited within the property value rather than designed (e.g. you can drag in buttons from the Toolbox, you can't edit their text by double clicking, you can't attach event bindings, etc.)

Phil.Strong
9 Mar 2012, 6:50 AM
Yeah we don't support that at the moment you have to add a toolbar docked bottom ... the verbose way

dockedItems: [{
xtype: 'toolbar',
dock: 'bottom',
ui: 'footer',
defaults: {minWidth: minButtonWidth},
items: [
{ xtype: 'component', flex: 1 },
{ xtype: 'button', text: 'Button 1' }
]
}]

It would be nice feature to add this as perhaps a new item in the toolbox called Toolbar Footer or have a quick way to convert toolbars inside a panel to use buttons property

froamer
13 Mar 2012, 1:23 AM
Thanks for the reply Phil.

The ui: 'footer' goes an long way to working around it.

Phil.Strong
13 Mar 2012, 9:35 PM
Glad we got at least a work around.

It's not something we won't add it's just stupid low on the list of uber features we're adding to D2

danklasson
17 Feb 2013, 4:44 AM
How do you add that dockedItem list to the window using Sencha Architect 2? The only code that is editable for me are the event bindings and functions.

danklasson
19 Feb 2013, 5:45 AM
Problem can be solved by creating another container and docking it to the bottom. Then you can put the button in that container. Only thing it aligns to the left, but that can probably be fixed with some custom css.

Phil.Strong
20 Feb 2013, 8:34 AM
Components can be docked once they sit inside any container.

Drag out a panel
place a button in the panel
search for dock in the config panel
set it's dock to top

http://cl.ly/image/183L0W063M1z