Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-swt-dev] Using Excel ActiveX control in SWT

Here's my sample code. It loads a frame and shows the menus, toolbar and
formula bar but no more.

Thanks

Richard.

public static void main(String[] args)
	{
		int i;
		Display display = new Display();
		Shell shell = new Shell(display);
	
		OleFrame frame = new OleFrame(shell, SWT.NONE);
		frame.setLayoutData(new GridData(GridData.FILL_BOTH));
				
		Menu bar = new Menu(shell, SWT.BAR);
		shell.setMenuBar(bar);
			
		OleClientSite clientSite = new OleClientSite(frame,
SWT.NONE, "Excel.Sheet");
			
		//OleAutomation oleAutomation = new
OleAutomation(clientSite);
		
		clientSite.setEnabled(true);
		clientSite.setVisible(true);
			
		frame.setVisible(true);
		clientSite.setSize(900, 900);
		
		i = clientSite.doVerb(OLE.OLEIVERB_INPLACEACTIVATE);
		
		frame.setSize(1000,1000);
		
		System.out.println(frame.getSize());
		
		if(i == OLE.S_OK)
		{
			System.out.println("OK");	
		}
		shell.open();
		shell.setSize(1001, 1001);
		
		while (!shell.isDisposed ())
		{
			if (!display.readAndDispatch ()) 
			{
				display.sleep ();
			}
		}
		
	
		display.dispose ();
	}

-----Original Message-----
From: Veronika Irvine [mailto:Veronika_Irvine@xxxxxxx]
Sent: 04 November 2002 14:20
To: platform-swt-dev@xxxxxxxxxxx
Subject: Re: [platform-swt-dev] Using Excel ActiveX control in SWT



Please post some sample code.  Have you given the OleFrame a size or added
a layout to its parent?



 

                      "Elliott, R C (Richard)

                      - London Particle Team"         To:
"'platform-swt-dev@xxxxxxxxxxx'" <platform-swt-dev@xxxxxxxxxxx>

                      <ElliottR2@xxxxxxxxxxxx         cc:

                      m>                              Subject:
[platform-swt-dev] Using Excel ActiveX control in SWT

                      Sent by:

                      platform-swt-dev-admin@

                      eclipse.org

 

 

                      04/11/2002 02:42 AM

                      Please respond to

                      platform-swt-dev

 

 




I followed the instruction in the article "ActiveX Support in SWT" to use
Excel in SWT.

When my program runs I can only view the Excel menu bar (minus the file
menu) and the toolbar but no spreadsheet is visible.

What could I be doing wrong? Does excel require a specail layout or does
the
composite in which it sits have to be scrollable? Anyone else tried this
successfully?

Thanks
Richard

============================================================================
====================

This electronic message (email) and any attachments to it are subject to
copyright and are sent for the personal attention of the addressee.
Although you may be the named recipient, it may become apparent that this
email and its contents are not intended for you and an addressing error has
been made. This email may include information that is legally privileged
and exempt from disclosure. If you have received this email in error,
please advise us immediately and delete this email and any attachments from
your computer system.   Coöperatieve Centrale Raiffeisen-Boerenleenbank BA
(trading as Rabobank Group Treasury and Rabobank
International),incorporated in the Netherlands. Registered with the
Registrar of Companies for England & Wales No. BR002630. Regulated by the
FSA.

The presence of this footnote also confirms that this email has been
automatically checked by us for the presence of computer viruses prior to
it being sent, however, no guarantee is given or implied that this email is
virus free upon delivery.

==================================================================

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev




_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev

================================================================================================
This electronic message (email) and any attachments to it are subject to copyright and are sent for the personal attention of the addressee. Although you may be the named recipient, it may become apparent that this email and its contents are not intended for you and an addressing error has been made. This email may include information that is legally privileged and exempt from disclosure. If you have received this email in error, please advise us immediately and delete this email and any attachments from your computer system.   Coöperatieve Centrale Raiffeisen-Boerenleenbank BA (trading as Rabobank Group Treasury and Rabobank International),incorporated in the Netherlands. Registered with the Registrar of Companies for England & Wales No. BR002630. Regulated by the FSA.

The presence of this footnote also confirms that this email has been automatically checked by us for the presence of computer viruses prior to it being sent, however, no guarantee is given or implied that this email is virus free upon delivery.

==================================================================

<<application/ms-tnef>>


Back to the top