PDA

View Full Version : Button not showing



mayur.tendulkar
22 Sep 2010, 10:58 PM
Hello all,

I'm very new to Sencha and today I'm trying to build my first ever Sencha app. However, when I write following code, I still can't see a button on the screen. Please help.

<script language="javascript" type="text/javascript">
Ext.setup({
onReady: function () {
alert("Demo Starting");
Ext.Button({
text: 'Sumbit Dude',
maxWidth: 300,
maxHeight: 50
});
}
});
</script>

evant
22 Sep 2010, 11:01 PM
You need to create an instance of the button:



new Ext.Button({
text: 'foo'
}).show();

mayur.tendulkar
23 Sep 2010, 11:11 PM
Thanks Evan. Worked for me. It was a silly mistake. Thanks again.