弹出菜单添加删除行

This commit is contained in:
一二三 2024-06-18 23:18:39 +08:00
parent da52c467cc
commit c105bb17cd

View File

@ -313,6 +313,12 @@ mainForm.popmenuLeft.add('向下插入一行',function(id){
curSelection.release(); curSelection.release();
mainForm.release(); mainForm.release();
} ) } )
mainForm.popmenuLeft.add('删除行',function(id){
var curSelection = mainForm.g_flexcell.selection();
mainForm.g_flexcell.delRow(curSelection.FirstRow, 1/*删除数量*/);
curSelection.release();
mainForm.release();
} )
//右侧弹出菜单 //右侧弹出菜单
mainForm.popmenuRight = win.ui.popmenu(mainForm); mainForm.popmenuRight = win.ui.popmenu(mainForm);
mainForm.popmenuRight.add('向左插入一列',function(id){ mainForm.popmenuRight.add('向左插入一列',function(id){
@ -327,6 +333,12 @@ mainForm.popmenuRight.add('向右插入一列',function(id){
curSelection.release(); curSelection.release();
mainForm.release(); mainForm.release();
} ) } )
mainForm.popmenuRight.add('删除列',function(id){
var curSelection = mainForm.g_flexcell.selection();
//TODO
curSelection.release();
mainForm.release();
} )
mainForm.g_flexcell.onMouseUp = function(Button , Shift, x, y){ mainForm.g_flexcell.onMouseUp = function(Button , Shift, x, y){