On Monday, December 10, 2012 2:41:52 AM UTC+1, tong123123 wrote:
>
> our colleague just found that in IE9, the following is not work:
>
> DockLayoutPanel dockLayoutPanel = new DockLayoutPanel(Unit.PX);
>> dockLayoutPanel.setSize("1024", "768");
>>
>
> the dockLayoutPanel will not shown (although it works in IE8).
>
> In IE9, we must write the px in setsize
>
>> DockLayoutPanel dockLayoutPanel = new DockLayoutPanel(Unit.PX);
>> dockLayoutPanel.setSize("1024px", "768px");
>>
>
> why this is the case?
>

Because of browser bugs/discrepancies.

setSize(foo, bar) is equivalent to style="width: foo; height: bar", and IE8 
used to default to pixels when the unit wasn't present.

If you're using pixels, use setPixelSize and you'll never forget the unit 
anymore.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/PiGCNJM__C0J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to