Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

DrawLabel.setAlignment("center") not working with IE8

$
0
0
Hi

I have found an issue with DrawLabel.setAlignment("center"). It works with FF 25, IE10, IE9 but not with IE7 and IE8. With IE7 and IE8, the label is not centered.

Builds tested:

* SmartGWT LGPL 4.0p (2013-12-11).
* SmartGWT LGPL 5.0d (2013-12-11).


Code:


        public void onModuleLoad() {

                DrawPane drawPane = new DrawPane(); 
                drawPane.setHeight(450); 
                drawPane.setWidth(700); 
                drawPane.setLeft(25); 
                drawPane.setShowEdges(true); 
                drawPane.setEdgeSize(4); 
                drawPane.setBackgroundColor("papayawhip"); 


                DrawLabel dl = new DrawLabel(); 
                dl.setLeft(150); 
                dl.setTop(150); 
                dl.setContents("0123456789"); 
                dl.setAlignment("center"); //does not work with IE8
                dl.setFontFamily("Tahoma");
                dl.setFontSize(24);
                drawPane.addDrawItem(dl, true);


                DrawOval dov = new DrawOval();
                dov.setOval(150, 150, 50, 50);
                drawPane.addDrawItem(dov, true);

                drawPane.draw();

}


Viewing all articles
Browse latest Browse all 4756

Trending Articles