增加Ctrl+S保存快捷键
This commit is contained in:
parent
72f279c6b7
commit
87d3adc4f8
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project ver="10" name="TabEditor++" libEmbed="true" icon="res\app.ico" ui="win" output="TabEditor++.exe" CompanyName="" FileDescription="TabEditor++" LegalCopyright="Copyright (C) iioio.com 2024" ProductName="TabEditor++" InternalName="TabEditor++" FileVersion="0.0.0.9" ProductVersion="0.0.0.9" publishDir="/dist/" dstrip="true" local="false" ignored="false">
|
||||
<project ver="10" name="TabEditor++" libEmbed="true" icon="res\app.ico" ui="win" output="TabEditor++.exe" CompanyName="" FileDescription="TabEditor++" LegalCopyright="Copyright (C) iioio.com 2024" ProductName="TabEditor++" InternalName="TabEditor++" FileVersion="0.0.0.11" ProductVersion="0.0.0.11" publishDir="/dist/" dstrip="true" local="false" ignored="false">
|
||||
<file name="main.aardio" path="main.aardio" comment="main.aardio"/>
|
||||
<folder name="资源文件" path="res" embed="true" local="false" ignored="false">
|
||||
<file name="app.ico" path="res\app.ico" comment="res\app.ico"/>
|
||||
|
|
45
main.aardio
45
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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user