델파이 TcxDBTreeList 북마크 사용하기
억지스럽지만.....모...;
procedure DBTreeListSelectBookmark_Go(DBTreeLiat:TcxDBTreeList;
iFocus, iFocus0,iFocus1,iFocus2,iFocus3: integer );
begin
case iFocus of
0 : DBTreeLiat.Items[iFocus0].Focused := True;
1 : DBTreeLiat.Items[iFocus0].Items[iFocus1].Focused := True;
2 : DBTreeLiat.Items[iFocus0].Items[iFocus1].Items[iFocus2].Focused := True;
3 : DBTreeLiat.Items[iFocus0].Items[iFocus1].Items[iFocus2].Items[iFocus3].Focused := True;
end;
end;
//노드마다 for 추가
function DBTreeListSelectBookmark(DBTreeLiat:TcxDBTreeList;
var iFocus0,iFocus1,iFocus2,iFocus3: integer):Integer;
var
i, o , p, l : integer;
Node,Node1,Node2,Node3 : TcxTreeListNode;
begin
iFocus0 := 0;
iFocus1 := 0;
iFocus2 := 0;
iFocus3 := 0;
for i := 0 to CB_grdCable.Count - 1 do
begin
Node := CB_grdCable.Items[i];
if Node.Selected then
begin
iFocus0 := i;
iFocus1 := o;
iFocus2 := p;
iFocus3 := l;
Result := 0;
Break;
exit;
end;
for o := 0 to Node.Count-1 do
begin
Node1 := CB_grdCable.Items[i].Items[o];
if Node1.Selected then
begin
iFocus0 := i;
iFocus1 := o;
iFocus2 := p;
iFocus3 := l;
Result := 1;
Break;
exit;
end;
for p := 0 to Node1.Count-1 do
begin
Node2 := CB_grdCable.Items[i].Items[o].Items[p];
if Node2.Selected then
begin
iFocus0 := i;
iFocus1 := o;
iFocus2 := p;
iFocus3 := l;
Result := 2;
Break;
exit;
end;
for l := 0 to Node2.Count-1 do
begin
Node3 := CB_grdCable.Items[i].Items[o].Items[p].Items[l];
if Node3.Selected then
begin
iFocus0 := i;
iFocus1 := o;
iFocus2 := p;
iFocus3 := l;
Result := 3;
Break;
exit;
end;
end;
end;
end;
end;
end;
'Delphi Tip > 그리드' 카테고리의 다른 글
Delphi 스트링그리드(StringGrid) 정렬 (0) | 2021.09.03 |
---|---|
델파이 Tcxgrid 선택한 값 가져오기 (0) | 2021.09.01 |
델파이 퀀텀그리드 Excel출력하기 (0) | 2021.08.31 |
델파이 퀀텀트리리스트 TcxDbTreeList 멀티셀렉트 데이터 키값가져오기 (0) | 2021.08.26 |
delphi tadvcolumngrid fixedcolor (0) | 2021.08.25 |
댓글