Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Browser widget issue
Browser widget issue [message #449015] Mon, 17 January 2005 19:21 Go to next message
Jim Adams is currently offline Jim AdamsFriend
Messages: 160
Registered: July 2009
Senior Member
I am attempt to use the Browser widget on windowsXP. The webpage that I am
displaying has javascript on it that opens another window to handle login
requests. This other window is implented using an application window that
only holds a Browser widget and nothing else. This window pops up in a very
small size but the widget itself never populates. I was wondering if anyone
had some example code that would simulate a real web browser better than
this. I have done this in the past in a similar case but the page that was
being opened didn't have all the code that this one has.

Frustrated....

Jim Adams
Re: Browser widget issue [message #449019 is a reply to message #449015] Mon, 17 January 2005 20:28 Go to previous messageGo to next message
Jim Adams is currently offline Jim AdamsFriend
Messages: 160
Registered: July 2009
Senior Member
I figured out the population issue. Now the problem is that I have no idea
how to set the size of the window. When this is viewed through IE, the
window sizes just fine. Is there a sizing event that I am missing maybe?

"Jim Adams" <Jim.Adams@sas.com> wrote in message
news:csh38a$pgk$1@www.eclipse.org...
> I am attempt to use the Browser widget on windowsXP. The webpage that I am
> displaying has javascript on it that opens another window to handle login
> requests. This other window is implented using an application window that
> only holds a Browser widget and nothing else. This window pops up in a
very
> small size but the widget itself never populates. I was wondering if
anyone
> had some example code that would simulate a real web browser better than
> this. I have done this in the past in a similar case but the page that was
> being opened didn't have all the code that this one has.
>
> Frustrated....
>
> Jim Adams
>
>
Re: Browser widget issue [message #449020 is a reply to message #449019] Mon, 17 January 2005 20:58 Go to previous messageGo to next message
Jim Adams is currently offline Jim AdamsFriend
Messages: 160
Registered: July 2009
Senior Member
Man, i am just answering my own questions here today. I figured out how to
set the size but I am getting an initial size that displays before I can
react to the WindowVisibility event. How do I create the application window
hidden? The code seems to require that I open the ApplicationWindow to
create the browser widget. This allows me to set the visibility listener but
the act of showing the window forces a default size and visibility.

"Jim Adams" <Jim.Adams@sas.com> wrote in message
news:csh8m4$ni9$1@www.eclipse.org...
> I figured out the population issue. Now the problem is that I have no idea
> how to set the size of the window. When this is viewed through IE, the
> window sizes just fine. Is there a sizing event that I am missing maybe?
>
> "Jim Adams" <Jim.Adams@sas.com> wrote in message
> news:csh38a$pgk$1@www.eclipse.org...
> > I am attempt to use the Browser widget on windowsXP. The webpage that I
am
> > displaying has javascript on it that opens another window to handle
login
> > requests. This other window is implented using an application window
that
> > only holds a Browser widget and nothing else. This window pops up in a
> very
> > small size but the widget itself never populates. I was wondering if
> anyone
> > had some example code that would simulate a real web browser better than
> > this. I have done this in the past in a similar case but the page that
was
> > being opened didn't have all the code that this one has.
> >
> > Frustrated....
> >
> > Jim Adams
> >
> >
>
>
Re: Browser widget issue [message #449125 is a reply to message #449020] Tue, 18 January 2005 15:27 Go to previous message
Christophe Cornu is currently offline Christophe CornuFriend
Messages: 304
Registered: July 2009
Senior Member
Hi Jim,

The javadoc for org.eclipse.swt.browser.WindowEvent outlines the typical
steps, in particular the following ones.
In response to OpenWindowListener.open: typically create a new Shell (but
don't call shell.open) and a new Browser.
In response to VisibilityWindowListener.show: set the size of the Shell and
invoke shell.open.

For a complete example, you can use the code from the SWT Browser Example.
Source code of the main class is here. That class takes care of handling the
WindowEvent's.
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.exa mples/src/org/eclipse/swt/examples/browserexample/BrowserExa mple.java?rev=HEAD&content-type=text/vnd.viewcvs-markup
It is part of the Eclipse "Example plug-ins" on the download page. You can
run it as a plugin from Windows > Show View > Other > SWT Examples > Web
Browser.

Chris
Previous Topic:Shell without image in title bar
Next Topic:Browser - error code
Goto Forum:
  


Current Time: Thu Nov 21 19:24:20 GMT 2019

Powered by FUDForum. Page generated in 0.02064 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top