postCreate() has some code from [17678] to handle a sizing quirk with IE7 margins/padding:
if(isIE && (isIE < 8 || dojo.isQuirks)){ // fixed in IE8/strict
with(this.titleNode){ // resize BUTTON tag so parent TD won't inherit extra padding
style.width = scrollWidth + "px";
this.connect(this.titleNode, "onresize", function(){
setTimeout( function(){ style.width = scrollWidth + "px"; }, 0);
});
}
}
Actually it's the same code you posted above.
I see the onresize handler firing in the case when the "change labels" button is pressed in test_Button.html (I added a console.log()), and further I'm not seeing a width problem, although I am seeing a height problem... can you attach your test case?