最近工作中遇到在swt程序中打开word文件,
察看了文档后OleClientSite能够实现这个功能,可是就是不能实现滚动条,
有哪位大哥了解这方面的帮小弟一忙。
代码:
    private File showfile;
    OleFrame oleFrame;
    OleClientSite clientSite;
    oleFrame = new OleFrame(composite, SWT.NULL);
    oleFrame.setLayout(new FillLayout());
    clientSite = new OleClientSite(oleFrame,          SWT.NULL,"Word.Document.8",showfile);
    clientSite.doVerb(OLE.OLEIVERB_SHOW);   我试着在oleFrame = new OleFrame(composite, SWT.NULL);加了SWT.V_SCOLL
滚动条出现,但拖动滚动条,word文件不随着动。
我又试着在new OleClientSite(oleFrame,SWT.NULL,"Word.Document.8",showfile);
加了SWT.V_SCOLL,出现的情况也是一样。