Ok it works, thanks !!!

Michael Pemberton wrote:

> the layer is not physically created until after it has beed added to a
> document (either directly or as a child of another layer) .  this means
> that the content size is not known.  if you change the precreate method to
> a create method, it should work.
>
> Nicolas MASSART wrote:
>
> > Oups, sorry for the bad reply to another subject... I'm not a good list
> > user, sorry...
> > Her is the message again :
> >
> > Hi, I'm trying to use the DynLayer getContentWidth (  )  method to set
> > the size
> > of a DynLayer in wich I inserted content using SetHTML.
> > But getContentWidth (  )  alwais return zero... Is it a late 1st April
> > Joke ???
> >
> > If any body knows anything about this... pleas help !!!
> >
> > Now, my JS code...
> >
> > function TTlayers(id,label,actiondef) {
> >         this.superClass=DynLayer;
> >         this.superClass(id,0,0,100,20);
> >         this.label=(label) ? label : '';
> >         this.actiondef=(actiondef) ? actiondef : '';
> >         this.addEventListener(TTlayers.listener);
> >         return this;
> > }
> >
> > TTlayers.prototype=new DynLayer();
> > TTlayers.prototype.getSubClass=function() { return TTlayers }
> > TTlayers.listener=new EventListener();
> > TTlayers.listener.onprecreate=function(e) {
> >         var o=e.getSource();
> >
> >         o.moveTo(0,(o.parent.children.length-1)*20);
> >
> >   o.setHTML('<table border=\"0\" cellspacing=\"0\"
> > cellpadding=\"5\"><tr><td>'+o.label+'</td></tr></table>');
> >
> >   alert(o.getContentHeight());
> >
> >         o.setVisible(true); // make sure the widget is visible
> >
> > }
> >
> > ----------------------------------------
> > Nicolas MASSART
> > mail : [EMAIL PROTECTED]
> >
> > Coleebris
> > 12, av de Versailles 75016 PARIS
> > web : http://www.coleebris.com/
> > tel : 01 40 50 60 47
> > fax : 01 40 50 67 66
> > ----------------------------------------
> >
> > _______________________________________________
> > Dynapi-Help mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/dynapi-help
>
> --
> Michael Pemberton
> [EMAIL PROTECTED]
> ICQ: 12107010
>
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-help

--
----------------------------------------
Nicolas MASSART
mail : [EMAIL PROTECTED]

Coleebris
12, av de Versailles 75016 PARIS
web : http://www.coleebris.com/
tel : 01 40 50 60 47
fax : 01 40 50 67 66
----------------------------------------



_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to