优化编辑器弹出框居中
This commit is contained in:
parent
2442aa265e
commit
3614e645b4
|
|
@ -3192,38 +3192,6 @@ type TEditer=class(TCustomcontrol) //
|
||||||
if not FShortCutshower.Parent then FShortCutshower.Parent := self;
|
if not FShortCutshower.Parent then FShortCutshower.Parent := self;
|
||||||
InitShowWndPos(FShortCutshower,"surcut",500,150,true);
|
InitShowWndPos(FShortCutshower,"surcut",500,150,true);
|
||||||
FShortCutshower.Show();
|
FShortCutshower.Show();
|
||||||
{s := "";
|
|
||||||
s += "ctrl+o 打开\r\n";
|
|
||||||
s += "ctrl+N 新建\r\n";
|
|
||||||
s += "ctrl+s 保存\r\n";
|
|
||||||
s += "ctrl+F 查找窗口\r\n";
|
|
||||||
s += "ctrl+R 替换窗口\r\n";
|
|
||||||
s += "ctrl+a 全选\r\n";
|
|
||||||
s += "ctrl+c 拷贝选择\r\n";
|
|
||||||
s += "ctrl+D 复制被插入当前行\r\n";
|
|
||||||
s += "ctrl+v 粘贴\r\n";
|
|
||||||
s += "ctrl+x 剪切选择\r\n";
|
|
||||||
s += "ctrl+G 定位到行\r\n";
|
|
||||||
s += "ctrl+L|Y 删除当前行\r\n";
|
|
||||||
s += "tab | shift+tab 多行选中时缩进\r\n";
|
|
||||||
s += "ctrl+/ 注释当前选择\r\n";
|
|
||||||
s += "ctrl+\\ 取消当前注释\r\n";
|
|
||||||
s += "ctrl+U 反撤销\r\n";
|
|
||||||
s += "ctrl+z 撤销\r\n";
|
|
||||||
s += "ctrl+tab 切换标签\r\n";
|
|
||||||
s += "F2 跳转到下一个断点行\r\n";
|
|
||||||
s += "F5 添加删除断点\r\n";
|
|
||||||
s += "Alt+F5 将选中字符串转换为大写\r\n";
|
|
||||||
s += "ctl+F5 将选中字符串转换为小写\r\n";
|
|
||||||
s += "F3 正向搜索先前搜索的字符\r\n";
|
|
||||||
s += "ctrl+F3 反向搜索先前搜索的字符\r\n";
|
|
||||||
s += "ctrl+tab 切换标签页\r\n";
|
|
||||||
s += "F9 执行当前页的代码\r\n";
|
|
||||||
s += "ctrl+F9 打开执行代码编辑器\r\n";
|
|
||||||
s += "F7 显示隐藏日志窗口\r\n";
|
|
||||||
s += "F1 对于tsl语言查找当前光标所在位置的帮助\r\n";
|
|
||||||
s += "alt+m 弹出tsl代码地图\r\n";
|
|
||||||
messageboxa(s,"快捷键说明",0,self);}
|
|
||||||
end
|
end
|
||||||
"³·Ïú":
|
"³·Ïú":
|
||||||
begin
|
begin
|
||||||
|
|
@ -3730,11 +3698,36 @@ type TEditer=class(TCustomcontrol) //
|
||||||
if flg or (not FFistShows[n])then
|
if flg or (not FFistShows[n])then
|
||||||
begin
|
begin
|
||||||
FFistShows[n]:= true;
|
FFistShows[n]:= true;
|
||||||
|
return move_popwnd_to_center2(wnd);
|
||||||
xy := Clienttoscreen(ix,iy);
|
xy := Clienttoscreen(ix,iy);
|
||||||
wnd.left := xy[0];
|
wnd.left := xy[0];
|
||||||
wnd.top := xy[1];
|
wnd.top := xy[1];
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
function move_popwnd_to_center2(wnd);
|
||||||
|
begin
|
||||||
|
////////////////////窗口居中处理/////////////////////////////////
|
||||||
|
////////////////////wnd待居中的窗口/////////////////////////////////
|
||||||
|
////////////////////pwnd父窗口/////////////////////////////////
|
||||||
|
pd := pwnd;
|
||||||
|
if pd then
|
||||||
|
begin
|
||||||
|
while not(pd.wspopup) do
|
||||||
|
begin
|
||||||
|
npd := pd.parent;
|
||||||
|
if npd then pd := npd;
|
||||||
|
else break;
|
||||||
|
end
|
||||||
|
r := pd.ClientRect;
|
||||||
|
xy := pd.clienttoscreen(r[0],r[1]);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
xy := array(0,0);
|
||||||
|
r := wnd._wapi.GetScreenRect();
|
||||||
|
end
|
||||||
|
wnd.Left := max(0,xy[0]+(r[2]-r[0]-wnd.width)/2) ;
|
||||||
|
wnd.top := max(0,xy[1]+(r[3]-r[1]-wnd.Height)/2);
|
||||||
|
end
|
||||||
function SetPageItemSyn(it,n);
|
function SetPageItemSyn(it,n);
|
||||||
begin
|
begin
|
||||||
if not it then return;
|
if not it then return;
|
||||||
|
|
|
||||||
Binary file not shown.
BIN
tsleditor.exe
BIN
tsleditor.exe
Binary file not shown.
BIN
tslvcltool.exe
BIN
tslvcltool.exe
Binary file not shown.
Loading…
Reference in New Issue