Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » not able to get back and forward function in browser widget
not able to get back and forward function in browser widget [message #756562] Mon, 14 November 2011 10:44 Go to next message
marie Missing name is currently offline marie Missing name
Messages: 63
Registered: March 2011
Member
Hi. all
I have implemented following class,which is extending from composite..
here is its constructor

public HTMLReportViewer(TestCaseEditor editor, Composite parent,File testCaseReportFile)
{
super(parent, SWT.NONE);

this.testCaseReportFile = testCaseReportFile;
GridLayout layout = new GridLayout();
layout.marginHeight = 0;
layout.marginWidth = 0;
layout.horizontalSpacing = 0;
layout.verticalSpacing = 0;
layout.numColumns = 1;
setLayout(layout);
setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));


browser = new Browser(this,SWT.NONE);
browser.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));

Button backButton = new Button(this, SWT.PUSH);
backButton.setText("Back");
backButton.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
browser.back();
}

public void widgetDefaultSelected(SelectionEvent e) {
}
});

Button forwardButton = new Button(this, SWT.PUSH);
forwardButton.setText("Forward");
forwardButton.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
browser.forward();
}

public void widgetDefaultSelected(SelectionEvent e) {
}
});


browser.forward();
browser.back();
When i tried to use this ..i ma getting compilation error
can any body tell me what i am doing wrong in its constructor..
thanks in advance!!!Smile
Re: not able to get back and forward function in browser widget [message #756638 is a reply to message #756562] Mon, 14 November 2011 14:47 Go to previous messageGo to next message
Lakshmi Shanmugam
Messages: 274
Registered: July 2009
Location: India
Senior Member
Hi,
What is the error that you get?


Lakshmi P Shanmugam
Re: not able to get back and forward function in browser widget [message #756777 is a reply to message #756638] Tue, 15 November 2011 04:09 Go to previous messageGo to next message
marie Missing name is currently offline marie Missing name
Messages: 63
Registered: March 2011
Member
it is not compiling,giving compilation error..

Re: not able to get back and forward function in browser widget [message #756915 is a reply to message #756777] Tue, 15 November 2011 14:18 Go to previous message
Lakshmi Shanmugam
Messages: 274
Registered: July 2009
Location: India
Senior Member
What is the compilation error that you get? Can you paste the error message here?

Lakshmi P Shanmugam
Previous Topic:Printing a shell
Next Topic:canceling key event
Goto Forum:
  


Current Time: Tue Sep 23 12:30:58 GMT 2014

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

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