编辑器

编辑器ctl+tab 实现循环
This commit is contained in:
JianjunLiu 2023-05-09 07:13:44 +08:00
parent 2362674bef
commit 6f0bb71708
1 changed files with 4 additions and 6 deletions

View File

@ -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