Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Ole Word Scrollbar
Ole Word Scrollbar [message #442509] Mon, 06 September 2004 14:35 Go to next message
jerome CALAFAT is currently offline jerome CALAFATFriend
Messages: 5
Registered: July 2009
Junior Member
Hi,

I am using Eclipse 3.0. I made an RCP application and i want to include a
viewer which opens Word and Excel documents in a view .
I manage to open these documents but i don't get the Horizontal and
Vertical Scrollbars.
Here is a part of my code:
//parent is a composite
frame = new OleFrame(parent, OLE.V_SCROLL | OLE.H_SCROLL );
site2 = new OleClientSite(frame, SWT.NONE , nomFichier);

frame.layout();
parent.layout();
site2.doVerb(OLE.OLEIVERB_SHOW);

I can see the Scrollbars but they are not binded to the document.
How can i do that?

Thanks in advance,

jérôme
Re: Ole Word Scrollbar [message #442707 is a reply to message #442509] Sun, 12 September 2004 19:41 Go to previous message
Eclipse UserFriend
Originally posted by: dwojtas.myrealbox.com

Jérôme Calafat wrote:
> Hi,
>
> I am using Eclipse 3.0. I made an RCP application and i want to include a
> viewer which opens Word and Excel documents in a view .
> I manage to open these documents but i don't get the Horizontal and
> Vertical Scrollbars.
> Here is a part of my code:
> //parent is a composite
> frame = new OleFrame(parent, OLE.V_SCROLL | OLE.H_SCROLL );
> site2 = new OleClientSite(frame, SWT.NONE , nomFichier);
>
> frame.layout();
> parent.layout();
> site2.doVerb(OLE.OLEIVERB_SHOW);
>
> I can see the Scrollbars but they are not binded to the document.
> How can i do that?
>
> Thanks in advance,
>
> jérôme

Hi,

Don't know if it helps, but you might look at the class
org.eclipse.ui.internal.editorsupport.win32.OleEditor
and this code snippet, Word specific:

Darek
----
private void handleWord() {
OleAutomation dispInterface = new OleAutomation(clientSite);
// Get Application
int[] appId = dispInterface.getIDsOfNames(new
String[]{"Application"});
if (appId != null) {
Variant pVarResult = dispInterface.getProperty(appId[0]);
if (pVarResult != null) {
OleAutomation application = pVarResult.getAutomation();
int[] dispid = application.getIDsOfNames(new String[]
{"DisplayScrollBars"});
if (dispid != null) {
Variant rgvarg = new Variant(true);
application.setProperty(dispid[0], rgvarg);
}
application.dispose();
}
}
dispInterface.dispose();
}
Previous Topic:Tree expandAll size
Next Topic:how to create glass pane?
Goto Forum:
  


Current Time: Tue Apr 30 03:44:42 GMT 2024

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

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

Back to the top