:: Forum >>

AW.UI.Label does not take coordinates from stylesheet


#l001001 {left:25px; top:50px; }

var l001001 = new AW.UI.Label;
l001001.setControlText("some text");
document.write(l001001);

The position of "some text" is always at 0px,0px.

Whereas:

var l001001 = new AW.UI.Label;
l001001.setControlText("some text");
l001001.setStyle("left","25px");
l001001.setStyle("top","50px");
document.write(l001001);

This works perfectly, but it is inconsistent with the rest of the controls. Doing some cleanup and found this as part of moving all coordinates to the stylesheet.

Running 2.5.3.

I believe this is a bug.
Myshka
Wednesday, December 3, 2008
I believe you don't quite understand how CSS works with AW.
http://www.activewidgets.com/aw.system.html/setid.html
Anthony
Wednesday, December 3, 2008
http://www.activewidgets.com/aw.system.html/setposition.html
Thursday, December 4, 2008
Anthony - thanks! I didn't see it even after staring at it for 1/2 hour. Without an ID, the browser doesn't know what object it is to match up the stylesheet! I'll put the setID attribute in right now!

I'm glad that I'm putting all of these things into the Javascript generator as I don't have to fix it more than once!
Myshka
Thursday, December 4, 2008

This topic is archived.


Back to support forum

Forum search