Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Plug-in with OLE-object (View) is not displayed correctly in the RCP
icon5.gif  Plug-in with OLE-object (View) is not displayed correctly in the RCP [message #531281] Tue, 04 May 2010 12:33 Go to next message
Mo is currently offline MoFriend
Messages: 12
Registered: March 2010
Junior Member
Hi,

I have used SWT to integrate Microsoft Excel (2000) into a View from my plug-in. This plug-in is integrated into my RCP. So far so good ..

It will be show my Excel-template with a worksheet and a chart sheet. As soon as I click on the chart sheet (worksheet->chartcheet) - it is displayed, but not correctly. If I change the size of the view, it is displayed correctly...

to reproduce the failure:

- Create a "plug-in with a view"
- Insert the following code in the view:

package exceltest;

import org.eclipse.swt.SWT;
import org.eclipse.swt.SWTError;
import org.eclipse.swt.ole.win32.OleClientSite;
import org.eclipse.swt.ole.win32.OleFrame;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;

public class View extends ViewPart {

	public static final String ID = "ExcelView";
	private OleClientSite site;

	public View() {
	}

	@Override
	public void createPartControl(Composite parent) {
		try {
			OleFrame frame = new OleFrame(parent, SWT.NONE);
			site = new OleClientSite(frame, SWT.NONE, "Excel.Sheet");
		} catch (SWTError e) {
			System.out.println("Unable to open activeX control");
			return;
		}
	}

	@Override
	public void setFocus() {
		 site.setFocus();
	}

}


- Run the plugin as eclipse-application (or put it into your rcp)

Pictures:

wrong:
http://img243.imageshack.us/img243/9193/bugolechartsheet.jpg

correct:
http://img88.imageshack.us/img88/3899/bugolechartsheetok.jpg



I am grateful for any help!! Smile

mo

[Updated on: Tue, 04 May 2010 12:58]

Report message to a moderator

Re: Plug-in with OLE-object (View) is not displayed correctly in the RCP [message #532100 is a reply to message #531281] Fri, 07 May 2010 08:06 Go to previous messageGo to next message
Mo is currently offline MoFriend
Messages: 12
Registered: March 2010
Junior Member
No one has an idea? Crying or Very Sad
Re: Plug-in with OLE-object (View) is not displayed correctly in the RCP [message #532226 is a reply to message #532100] Fri, 07 May 2010 15:13 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi,

I've tried your case, the initial Excel sheet shows fine. What do I need to
do to show the chart sheet? I don't see it available on a context menu.
Maybe my Excel is too old (Excel 2002 on Windows 2000)?

Grant


"Mo" <mo84@gmx.de> wrote in message news:hs0hmn$2c8$1@build.eclipse.org...
> No one has an idea? :cry:
Re: Plug-in with OLE-object (View) is not displayed correctly in the RCP [message #532237 is a reply to message #531281] Fri, 07 May 2010 16:07 Go to previous messageGo to next message
Mo is currently offline MoFriend
Messages: 12
Registered: March 2010
Junior Member
Hi,

that's a bit hidden.

- You have a taskbar at the bottom ( in my screenshot with "Diagramm1", "Tabelle1")

- ...right-mouse-click on one item in this bar

- then you should see a menu where you can insert a chart-sheet (insert -> chart)

Smile

greetings,

mo

[Updated on: Fri, 07 May 2010 16:09]

Report message to a moderator

Re: Plug-in with OLE-object (View) is not displayed correctly in the RCP [message #532685 is a reply to message #531281] Mon, 10 May 2010 20:17 Go to previous messageGo to next message
Mo is currently offline MoFriend
Messages: 12
Registered: March 2010
Junior Member
Grant, can you now insert a chart-sheet? I have really no idea more Sad should I create a bug-report? greetings, mo

Re: Plug-in with OLE-object (View) is not displayed correctly in the RCP [message #532916 is a reply to message #532237] Tue, 11 May 2010 14:33 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Ok, I'm able to create the chart, but it shows fine for me, no resize
required. Our set-ups probably don't match, and perhaps something has
changed in Excel between our versions to give us different results. Logging
a report with swt at
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform &component=SWT
would be a good idea, and be sure to mention your versions of Windows,
Excel, and SWT.

Grant


"Mo" <mo84@gmx.de> wrote in message news:hs1drm$9em$1@build.eclipse.org...
> Hi,
>
> - You have a taskbar at the bottom ( in my screenshot with "Diagramm1",
"Tabelle1")
>
> - ...right-mouse-click on one item in this bar
>
> - then you should see a menu where you can insert a chart-sheet (insert ->
chart)
>
> :)
>
> greetings,
>
> mo
Re: Plug-in with OLE-object (View) is not displayed correctly in the RCP [message #532928 is a reply to message #531281] Tue, 11 May 2010 15:10 Go to previous message
Mo is currently offline MoFriend
Messages: 12
Registered: March 2010
Junior Member
Hi Grant,

I have tested the following combinations:

- Eclipse Galileo (Eclipse for RCP/Plug-in Developers)
- Windows 7/XP
- Excel 2000/2003/2007
- Java SE 1.6.0_17-b04 / Java DK 1.6.0_17

what is you´re configuration? Do you launch the "Plug-in with a view" as "Eclipse-Application" as I do? (when I create an "RCP with a View" I don´t have problems, too)


My bug report:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=312410

[Updated on: Wed, 12 May 2010 08:30]

Report message to a moderator

Previous Topic:Customizing Eclipse error message when no jre is found
Next Topic:Unable to export RCP Application
Goto Forum:
  


Current Time: Wed Apr 24 17:17:16 GMT 2024

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

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

Back to the top