forked from liujianjun/tslediter
界面库
listbox getcurrentselection 优化
This commit is contained in:
@@ -3257,9 +3257,29 @@ type TcustomListBox=class(TCustomListBoxbase)
|
|||||||
{**
|
{**
|
||||||
@explan(说明)获取当前选中项的索引,仅用于单选的列表框%%
|
@explan(说明)获取当前选中项的索引,仅用于单选的列表框%%
|
||||||
**}
|
**}
|
||||||
if FMultisel=0 then
|
case FMultisel of
|
||||||
begin
|
0: //单选
|
||||||
return FSelBegin;
|
begin
|
||||||
|
return FSelBegin;
|
||||||
|
end
|
||||||
|
1: //连续选择
|
||||||
|
begin
|
||||||
|
return array(FSelBegin,FSelEnd);
|
||||||
|
end
|
||||||
|
2: //间断选择
|
||||||
|
begin
|
||||||
|
r := array();
|
||||||
|
rl := 0;
|
||||||
|
for i,v in FMultisel3Data do
|
||||||
|
begin
|
||||||
|
if v then
|
||||||
|
begin
|
||||||
|
r[rl] := i;
|
||||||
|
rl++;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return r;
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return -1;
|
return -1;
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user