Ext新建子窗体


function showpic(pno,index){
var win = new Ext.Window({
title: '模型对比图',
closable:true,//是否关闭按钮
width:500,
height:360,
id:'addwin',
//border:false,
plain:true,
//layout: 'border',//窗体布局方式
items: [{
xtype:'box',
autoEl:{
width:500,
height:360,
tag:'iframe',
src:'modelcompare.action?pno='+pno+'&indexModel='+index
}
}]
});
win.show();
}
public class MyAddin : IDTExtensibility2, IRibbonExtensibility { public static Application wpp; public static Application app = null; // 插件加载时触发 public void OnConnection(object application, ext_ConnectMode connectMode, object addInInst, ref Array custom) { wpp = (Application)application; wpp.DocumentOpen += OnDocumentOpen; app = wpp as Word.Application; } // 文档打开时插入“Hello World” private void OnDocumentOpen(Document doc) { //doc.Content.Text = "Hello World from COM Add-in!"; } // 其他接口方法(保持空实现) public void OnDisconnection(ext_DisconnectMode disconnectMode, ref Array custom) { } public void OnAddInsUpdate(ref Array custom) { } public void OnStartupComplete(ref Array custom) { } public void OnBeginShutdown(ref Array custom) { } public string GetCustomUI(string RibbonID) { return @" <customUI xmlns='http://schemas.microsoft.com/office/2019/07/customui' onLoad='Ribbon_Load'> <ribbon> <tabs> <tab id='MainTab' label='AI助手'> <!-- 新写功能 --> <group id='GroupNew' label='新创作'> <button id='btnNewWrite' label='新写' size='large' getImage='GetButtonImage' onAction='OnButtonClick' getEnabled='GetButtonEnabled' showItemLabel='true' itemWidth='200' itemHeight='80' screentip='新建文档' supertip='创建新的智能文档'/> <!-- 内容续写 --> <button id='btnContinueWrite' label='续写' size='large' getImage='GetButtonImage' onAction='OnButtonClick' getEnabled='GetButtonEnabled' screentip='继续写作' supertip='根据现有内容继续扩展写作'/> <!-- 内容扩展 --> <button id='btnExpandWrite' label='扩写' size='large' getImage='GetButtonImage' onAction='OnButtonClick' getEnabled='GetButtonEnabled' screentip='扩展内容' supertip='对现有内容进行详细扩展'/> <!-- 优化改写 --> <button id='btnRewrite' label='重写' 这是我现在的代码.我要在点击"新写"按钮时,在文档右侧打开一个窗格
03-21
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值