Hmm, dunno in my case the frame is a child of reusable singleton window, I
create the frame just before show()ing the qx.ui.window.Window and remove it
when the Window is close()'d. I did it this was around as one of the many
combinations testing and it kind of stuck, but there might be something
there. I did find non-Qx code that said you needed to do call focus() before
print(). Have you tried this is multiple browsers? I noticed a few
differences (e.g. the ordering of events differs between FF & Chrome)
John
From: Ken MacDonald <[email protected]>
Reply-To: qooxdoo Development <[email protected]>
Date: Tue, 22 Nov 2011 13:53:45 -0500
To: qooxdoo Development <[email protected]>
Subject: Re: [qooxdoo-devel] Qooxdoo: Display and print HTML taller than
window?
Thanks John,
Looks promising, tthanks! Still not getting it quite to happen though.
Here's what I did (wrong, I guess):
created the about:blank, added innerHTML in the load(), added this.__frame
to the appl. Root:
this.getRoot().add(this.__frame);
set frame to hidden:
this.__frame.setVisibility("excluded");
then when i want to see/print:
this.__frame.setVisibility("visible");
which shows my HTML, including scroll bar (yay!); but the call to
this__frame.getWindow().print() didn't seem to have any effect, and printing
with the regular Windows File->print gives me the on-screen portion of the
HTML only. Did I add the __frame at the wrong level? Or...??
Ken
On Tue, Nov 22, 2011 at 11:52 AM, John Spackman <[email protected]>
wrote:
> I had to do this just this morning :)
>
> Create the iframe and set the source property to "about:blank" and add a
> "load" listener; if you don't set the source property you never get a "load"
> (or "appear") event. Your load listener sets the body, e.g.:
>
> this.__frame = new qx.ui.embed.Iframe("about:blank");
>
> this.__frame.addListener("load", function() {
>
> var doc = this.__frame.getDocument();
>
> doc.body.innerHTML = '<p>hello world</p>';
>
> }, this);
>
>
> And when you want to print:
>
> this.__frame.getWindow().print();
>
>
> Tested on FF and Chrome.
>
> John
>
> From: Ken MacDonald <[email protected]>
> Reply-To: qooxdoo Development <[email protected]>
> Date: Tue, 22 Nov 2011 11:41:36 -0500
> To: qooxdoo Development <[email protected]>
> Subject: Re: [qooxdoo-devel] Qooxdoo: Display and print HTML taller than
> window?
>
> We are hoping not to have to open a new window; is there a way to modify the
> embed.html 'div' settings when it is created, or otherwise get this to work in
> a single qooxdoo window?
> Ken
>
> On Tue, Nov 22, 2011 at 11:19 AM, thron7 <[email protected]>
> wrote:
>>
>>
>> On 11/22/2011 03:49 PM, Ken MacDonald wrote:
>>> > Hi,
>>> > We are looking for a solution for a client to be able to display some
>>> > arbitrary html in our qooxdoo app; specifically some html that may
>>> > turn out to be too tall for the window or for the computer screen. I
>>> > can get scroll bars which allow me to view the html all of the way to
>>> > the bottom, but if I use the File->Print to print, all we are getting
>>> > is the portion of the html that is visible on the screen. We would
>>> > like to have the entire document print, even if it takes several
>>> > pages. I 've tried a number of combinations, trying to set the Root's
>>> > height, with or without a Scroll container, etc. but in all case my
>>> > printout is only the visible portion on the screen, not the entire html.
>>
>>
>> The issue relates to the way layouts are handled in qooxdoo. The
>> enclosing Div's of your, say, embed.Html element have fixed dimensions.
>> If you then invoke File->Print the browser has no other chance then to
>> print just this visible part. A solution could be to implement an own
>> "Print" button, and on press open a new browser window, and setting your
>> HTML string as the body's innerHtml. Then let the user print *this* window.
>>
>> T.
>>
>>
----------------------------------------------------------------------------->>
-
>> All the data continuously generated in your IT infrastructure
>> contains a definitive record of customers, application performance,
>> security threats, fraudulent activity, and more. Splunk takes this
>> data and makes sense of it. IT sense. And common sense.
>> http://p.sf.net/sfu/splunk-novd2d
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security threats,
> fraudulent activity, and more. Splunk takes this data and makes sense of it.
> IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d_____________________________________________
> __ qooxdoo-devel mailing list
> [email protected]https://lists.sourceforge.net/lists/listinf
> o/qooxdoo-devel
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
----------------------------------------------------------------------------
-- All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security threats,
fraudulent activity, and more. Splunk takes this data and makes sense of it.
IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d___________________________________________
____ qooxdoo-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel