PDA

View Full Version : [CLOSED][3.??] tbar w/ tbfill does not adjust when resized



PCSpectra
3 Feb 2010, 6:59 AM
Not sure if this is a bug or I am expected to resize the toolbar explicitly, but...

When I resize the splitter window to be smaller thasn it was originally the 'New Procedure' icon button does not move in, so it becomes invisible.

The button seems to adjust accordingly when the window is resized to be larger, which is what concerns me, whether I have stumbled across an actual bug or just a mistake on my end. So please pardon me if I have posted a non-issue.

Hopefully the attachment helps in letting you see what I mean.




var toolbar = new Ext.Toolbar({
items:
[
{
xtype: 'button', text: 'Status: All', id: 'status_filter_id',
menu: { items: [menu_status] }
},
{
xtype: 'button', text: 'Region: All', id: 'region_filter_id',
menu: { items: [menu_status] }
},
{xtype: 'tbfill'},
{
text: 'New Procedure',
iconCls: 'silk-add',


listeners: {
click: function() {
var details = new Array();
initProcedureDialogAll(details, false);
}
}
}
]
});


Cheers,
Alex

Jamie Avins
3 Feb 2010, 9:17 AM
Do you have a test case that is runnable?

PCSpectra
3 Feb 2010, 12:33 PM
No I do not, I just tried to quickly throw togather an example, focusing on only the parts which would 'probably affect' the resizing issue, but of course, no dice. My test demo worked flawlessly. :P

One thing I did observe however, is that FireFox does not have this same issue, it appears to be IE8. Also of possible interest, is that only resizing to smaller widths causes the issue, when I resize to something larger, the toolbar button flushes up against the wall...

Cheers,
Alex

Jamie Avins
3 Feb 2010, 1:05 PM
It looks you are running into a limitation in IE (one that is expensive to work around too). An auto-sized element in IE will size to the largest child item, superceeding the parent's size. So making the parent smaller doesn't change it's the size because the child is keeping it at a larger size. Making the parent larger does work though, since the child elements don't superceed. In the 3.1.1, there's a workaround in ContainerLayout called IEMeasureHack which hides all the child elements so they won't interfere with the measurement we need. This proved to be quite an expensive hack and other methods may do the job better so it's left there as an experiment.

Sorry if the explanation is confusing.

PCSpectra
4 Feb 2010, 4:56 PM
I follow somewhat...nothing mission critical but an explanation is always appreciated :)

If I can figure out how to persist the size of the splitter windows across refresh, that should work as a temp solution as well. If I change the width of the splitter and refresh it renders normally, my concern is only due to the fact that users will expect to be able to resize the splitter, have those changes 'stick' and still see toolbars.

For the time being I will simply tell them to use FF or refresh. :)

Cheers,
Alex