Skip to content

Instantly share code, notes, and snippets.

@pphetra
Last active December 18, 2015 20:28
Show Gist options
  • Select an option

  • Save pphetra/5840175 to your computer and use it in GitHub Desktop.

Select an option

Save pphetra/5840175 to your computer and use it in GitHub Desktop.
mywin = Ext.create('Ext.window.Window', {
title: 'Hello',
height: 400,
width: 400,
layout: {
type: 'table',
columns: 3
},
items: [
{
xtype: 'textfield',
colspan: 3
},
{
xtype: 'button',
text: '7',
listeners: {
'click': function() {
var oldValue = mywin.down('textfield').getValue();
mywin.down('textfield').setValue(oldValue + '7');
}
}
},
{
xtype: 'button',
text: '8'
},
{
xtype: 'button',
text: '9'
},
{
xtype: 'button',
text: '4'
},
{
xtype: 'button',
text: '5'
},
{
xtype: 'button',
text: '6'
},
{
xtype: 'button',
text: '1'
},
{
xtype: 'button',
text: '2'
},
{
xtype: 'button',
text: '3'
},
{
xtype: 'button',
text: '0'
},
{
xtype: 'button',
text: 'clear',
colspan: 2
}
]
});
mywin.show();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment