From: wes c. <we...@we...> - 2001-02-20 04:18:02
|
I tried this widget and noticed your border settings were ordered top, bottom, left, right. It seems every other dynapi widget used top, right, bottom, left. I personally find it helpful to have most widgets work the same way, otherwise liked the interface and documentation, along with the widget. wes Simon Dicon Montford wrote: > > Here's a solution for NS6 getContentHeight/Width: > get the dimensions of the inner child. > > Well, it works for DynLayers with only one child which is all > that's needed for widgets such as Label. > > I also found it better on IE5. > > Maybe you could use it as a stop-gap (even call it > DynLayer.prototype.getOnlyChildHeight/Width). > > Here's what I did with a version of Label I was working on: > > Label.prototype.getContentWidth=function(){ > if(is.ie)return this.elm.children[0].clientWidth > else if(is.ns4)return this.doc.width > else if(is.ns5)return > parseInt(getComputedStyle(this.elm.firstChild,0).getPropertyValue("width")) > } > Label.prototype.getContentHeight=function(){ > if(is.ie)return this.elm.children[0].clientHeight > else if(is.ns4)return this.doc.height > else if(is.ns5)return > parseInt(getComputedStyle(this.elm.firstChild,0).getPropertyValue("height")) > } > > You can see it working with pre-precreate version of DynAPI on the demos at: > > http://www.montford.f2s.com/dynatrix_docs/tutorial/label.html > > Tested on ns4.7, ie5 and ns6 for Windows. > > I played briefly on ie4.5 for Mac and it seemed to size OK (although I > noticed that the text selection > didn't turn on and off). > > Dicon > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-dev |