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