PDA

View Full Version : [2.0b1] button doesn't show the text on it



vladimir
11 Oct 2007, 6:03 AM
Gentlemen,
May be I miss something but sample from this link
http://extjs.com/learn/Tutorial:Appl..._for_Beginners
isn't work with 2.0-beta1 button has no text. if i use 1.1 everything goes right.

-vladimir

wm003
11 Oct 2007, 8:19 AM
Same for me...it seems no parameters will be applied to the button in 2.0: No Text, no Handler, no properties (like disabled:true).

What are we doing wrong?


Btw: A simple working sample of each object would be great to see in the Documentation. Its nice to have all properties listed there, but its still not easy to get working examples (especially for beginners)

wm003
12 Oct 2007, 6:37 AM
Gentlemen,
May be I miss something but sample from this link
http://extjs.com/learn/Tutorial:Appl..._for_Beginners
isn't work with 2.0-beta1 button has no text. if i use 1.1 everything goes right.

-vladimir
I got it working myself in 2.0 :)
You need to change the init-funtion as follows and it works perfectly with 2.0. B)

init: function() {

btn1 = new Ext.Button({

text: this.btn1Text,
handler: btn1Handler,
scope:this
});

btn1.render('btn1-ct');
}

vladimir
14 Oct 2007, 10:18 PM
Yes, thanks it works. But is this correct way to do initialization or just workaround?