|OleClientSite Trouble with Excel [message #650630]
||Tue, 25 January 2011 18:58
|| Philipp M. Fischer
Registered: November 2010
I am currently developing an Eclipse RCP App including an editor that has to embed an Excel application as in-place editor. I am using the OLE facilities from SWT. In detail I am using the OleControlSite referencing to a xls-file in order to open the Excel instance. In general things look fine but I am facing the following problems :
1. Looking to MSDN and other sources, I understand that if trigerring the doVerb(OLE.OLEIVERB_INPLACEACTIVATE) Excel should show up not messing around with the menus of the RCP until the user gives the focus to the Excel client. As soon as the client looses focus the RCP menus should get back to normal, but they don't. Is this a bug? Or is it just me not understanding some bits?
2. To overcome the first problem, I added a FocusListener to the OleControlSite, to do the doVerb(OLE.OLEIVERB_INPLACEACTIVATE) as soon as excel gets the focus, and to call deactivateInPlaceClient() as soon as it looses focus. Doing this I am fine with my RCP Menus and the Excel menus' mixins. Unfortunately now, calling the deactivateInPlaceClient(), will stop rendering the Excel application correctly and it just shows the "A1" cell stretched to the size of the OleFrame.
Does anyone know how to get around theses Issues. I am currently trying to activate and deactivate the Excel's "CommandBars" together with the FocusListener but firstly it is not a beautiful approach, secondly I don't even know if it will work.
Powered by FUDForum
. Page generated in 0.02365 seconds