From 6f0bb7170885bcfef72842a07193b0fbe71e6a0e Mon Sep 17 00:00:00 2001 From: JianjunLiu Date: Tue, 9 May 2023 07:13:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 编辑器ctl+tab 实现循环 --- designer/utslcodeeditor.tsf | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/designer/utslcodeeditor.tsf b/designer/utslcodeeditor.tsf index 9ac9e54..1fe9d16 100644 --- a/designer/utslcodeeditor.tsf +++ b/designer/utslcodeeditor.tsf @@ -4294,7 +4294,9 @@ type TEditer=class(TCustomcontrol) // sit := sselect[0]from sr order by[1]asc end; FCurrentItemCode := sselect[2]from sr order by[1]desc end; FListPages.SetData(sit); - FListPages.IncIndex(-1); + //FListPages.IncIndex(-1); + FListPages.SetCurrentSelection(1); + xy := ClientToScreen(100,100); FListPages.Top := xy[1]; FListPages.Left := xy[0]; @@ -5687,11 +5689,7 @@ type TListPages=class(TListBox) if ifnil(f)then f :=-1; idx := getCurrentSelection(); ct := ItemCount; - nidx := idx-f; - if nidx>=ct or nidx<0 then return ; - - if idx=ct-1 then nidx := 0; - else if idx=-1 then nidx := 1; + nidx := (idx-f+ct) mod ct; SetCurrentSelection(nidx); //InsureItemVisible(nidx); end