||Mon, 26 April 2010 14:48
| Grant Gayed
Registered: July 2009
I don't think there's a general way to do this for all browser types. No
notification is sent when new windows/shells are created, and in the case of
the Browser embedding IE, swt is not involved at all in showing the dialog.
this, in which case you can Browser.execute() it.
If what you want is for window.print() to just print silently without asking
the user for print settings then this can be done when the Browser is
embedding Mozilla with a line like:
"var prefs =
"prefs.setBoolPref(\"print.always_print_silent\", true);" +
The only problem with doing this is that these preference settings are
shared amongst all mozilla-based Browser instances, so they will also be
applied to other Browser controls that are not part of your app. Even
worse, these preference values will be persisted at shutdown time and will
be automatically used in future sessions. So the only use case where
changing preferences like this is suggested is if you have a stand-alone
application (since there won't be other Browser instances from other apps
being affected by your change), AND if you re-set these preference values to
their original values at shutdown time before they are written out (because
all eclipse-based apps share a common profile). For info on
getting/setting/clearing preference values like this see
http://www.mozilla.org/projects/embedding/embedapiref/embeda pi83.html .
"Filip" <firstname.lastname@example.org> wrote in message
pages beying loaded in the browser. E.g. there is window.print() on the page
so the print dialog is invoked.
> I have found that somebody have/had the same problem but i dont think they
> I have an idea. The print dialog is a child window, isn't it? Is it
possible to detect and delete all child windows of the main window with the
> Thanks a lot for any ideas.
Powered by FUDForum
. Page generated in 0.18910 seconds