From 87d3adc4f8679688c7c66f7e38e7e980671caa3a Mon Sep 17 00:00:00 2001 From: Crimson Date: Sat, 20 Jul 2024 21:43:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0Ctrl+S=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E5=BF=AB=E6=8D=B7=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- default.aproj | 2 +- main.aardio | 45 ++++++++++++++++++++++++++++----------------- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/default.aproj b/default.aproj index b052f0f..b8d3ed3 100644 --- a/default.aproj +++ b/default.aproj @@ -1,5 +1,5 @@  - + diff --git a/main.aardio b/main.aardio index 617bf26..1bad066 100644 --- a/main.aardio +++ b/main.aardio @@ -10,11 +10,10 @@ import flexcell; import teUtils; import teMenu; /*DSG{{*/ -var mainForm = win.form(text="TabEditor++";right=1399;bottom=799;bgcolor=16777215;) +var mainForm = win.form(text="TabEditor++";right=1399;bottom=799;bgcolor=16777215) mainForm.add( -custom={cls="custom";text="自定义控件";left=0;top=36;right=1400;bottom=800;ah=1;aw=1;bgcolor=12639424;db=1;dl=1;dr=1;dt=1;z=2;}; -plus={cls="plus";left=0;top=0;right=1400;bottom=36;bgcolor=16777215;border={left=1;top=1;right=1;color=-6250332;};clipBk=false;clipch=1;dl=1;dr=1;dt=1;font=LOGFONT(h=-18);forecolor=16777215;notify=1;repeat="stretch";z=1;}; - +custom={cls="custom";text="自定义控件";left=0;top=36;right=1400;bottom=800;ah=1;aw=1;bgcolor=12639424;db=1;dl=1;dr=1;dt=1;z=2}; +plus={cls="plus";left=0;top=0;right=1400;bottom=36;bgcolor=16777215;border={left=1;top=1;right=1;color=-6250332};clipBk=false;clipch=1;dl=1;dr=1;dt=1;font=LOGFONT(h=-18);forecolor=16777215;notify=1;repeat="stretch";z=1} ) /*}}*/ @@ -376,19 +375,6 @@ mainForm.g_flexcell.onSelChange = function(FirstRow,FirstCol,LastRow,LastCol){ } /*}}*/ -//搜索窗口 -var openSearchForm = function(){ - frmChild.show(); - frmChild.editSearchInput.setFocus(); -} - -var accelerator = win.ui.accelerator({ - { - ctrl = true; vkey = 'F'#; - oncommand = function() openSearchForm(); - }; -},mainForm ); - research_flag = true; searchNextContent = function(data, firstRow, firstCol, lastRow, lastCol, isRangeSearch, selFirstRow, selFirstCol, searchContent, isCaseSensitive, isCellMatching){ if(isRangeSearch){// 从一个范围开始搜索 @@ -534,6 +520,31 @@ subscribe("search_next",function(...){ curSelection.release(); } ) + + +//搜索窗口 +var openSearchForm = function(){ + frmChild.show(); + frmChild.editSearchInput.setFocus(); +} + +var accelerator = win.ui.accelerator({ + { + ctrl = true; vkey = 'F'#; + oncommand = function() openSearchForm(); + }; + { + ctrl = true; vkey = 'S'#; + oncommand = function(){ + var curRow = mainForm.g_flexcell.ActiveCell().Row; + var curCol = mainForm.g_flexcell.ActiveCell().Col; + mainForm.g_flexcell.Cell(curRow, curCol).SetFocus(); // 不加这个,光标处于的单元格内容不会被保存----规避方案 + teUtils.saveTxtTableData(mainForm.g_flexcell.getVlistData()); + showUnmodifyStyle(); + }; + }; +},mainForm ); + import win.ui.minmax; win.ui.minmax(mainForm,860,400);