Stefan,
Have you ever used the Appear event? Nothing actually gets displayed prior
to your event code getting executed. THe qooxdoo code knows to handle the
event code before actually displaying the control, the user does not see
anything except your object displaying at it's new position. I use it all
the time. Give it a try before you dismiss the solution all together, you
might just be pleased with the results.
Jim
On Tue, Oct 5, 2010 at 10:50 PM, Stefan Andersson <[email protected]
> wrote:
> Hej Jim!
>
> Thanks for your thoughts!
>
> >Just move it in the Appear event. Add an event listener for Appear and get
> >your values then, make needed changes, and when the control gets displayed
> >it should be where you want it.
>
> As we wrote we want something displayed before and during the creation not
> after it has been created and added,
> so this way is not a solution.
>
> >You can not get the absolute coordinates of a DOM element before it's
> >rendered, they don't exist. And since you decided to do this inline instead
> >of making the whole page a qooxdoo app, those are the rules you need to play
> >by.
>
> We are well aware of that, though we can get the width of the div tag, but
> not the height. Still, the full box is
> drawn by its height, so it might be possible to get the "definition" height
> (div), not the "drawn" height.
>
> Any object not added to the layout hierarchy can't be calculated. But it is
> possible to get the location of the
> div within the page before rendering of the inline and its width. The height
> of the div has also been defined
>
> and should logically be possible to get (without hard coding or ugly code).
>
> Stefan
>
>
> >Jim
>
>
>
> On Tue, Oct 5, 2010 at 2:00 PM, Stefan Andersson
> <[email protected]>wrote <[email protected]%3ewrote>:
>
> > I want to hear your reasoning about this:
> >
> > an inline application with a tag called
> >
> > <div id="tot"></div>
> >
> > tot.css
> > height : 480px;
> > width : 720px;
> >
> > //this.debug(inlineIsle.getBounds().height + " " +
> > inlineIsle.getBounds().width + " " + inlineIsle.getBounds().left + "
> > " + inlineIsle.getBounds().top);
> >
> > - does not work as it has not got any bounds yet
> >
> > this.debug(inlineIsle.getHeight() + " " + inlineIsle.getWidth());
> >
> > - null
> >
> > this.debug(inlineIsle.getMinHeight() + " " + inlineIsle.getMinWidth());
> >
> > - null
> >
> > this.debug(inlineIsle.getMaxHeight() + " " + inlineIsle.getMaxWidth());
> >
> > - null
> >
> > //this.debug(inlineIsle.getContentLocation().bottom + " " +
> > inlineIsle.getContentLocation().top + " " +
> > inlineIsle.getContentLocation().left + " " +
> > inlineIsle.getContentLocation().right);
> >
> > - does not exist yet
> >
> > this.debug(inlineIsle.getContainerLocation().bottom + " " +
> > inlineIsle.getContainerLocation().top + " " +
> > inlineIsle.getContainerLocation().left + " " +
> > inlineIsle.getContainerLocation().right);
> >
> > gives:
> >
> > right and left -> correct values
> > top = bottom -> means that height is zero, so bottom is wrong meaning that
> > it does not yet contain anything (of course)
> >
> >
> > Then the question: I need to know the height of the div but I can not get
> > it this way. Also tried content element but I could not get it.
> >
> > What would be your suggestions?
> >
> > The reason is to center something on screen, like a splash screen, before
> > the application comes up.
> >
> > Our solution now was to hard code the height value, which is not so nice!
> >
> > Stefan
> >
> >
> > ------------------------------------------------------------------------------
> > Beautiful is writing same markup. Internet Explorer 9 supports
> > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
> > Spend less time writing and rewriting code and more time creating great
> > experiences on the web. Be a part of the beta today.
> > http://p.sf.net/sfu/beautyoftheweb
> > _______________________________________________
> > qooxdoo-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> >
> >
>
>
>
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
> Spend less time writing and rewriting code and more time creating great
> experiences on the web. Be a part of the beta today.
> http://p.sf.net/sfu/beautyoftheweb
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel