TcxTreeList의 추가 삭제 부분입니다.

TcxTreeList의 추가 삭제 부분입니다.

procedure TForm1.버튼_추가Click(Sender: TObject);
  Procedure 추가( N : TcxTreeListNode );
  begin
      With  N.AddChild do
      begin
        Values[ cxTreeList1Column1.ItemIndex ] := N.AbsoluteIndex;
        Values[ cxTreeList1Column2.ItemIndex ] := cxTextEdit1.Text;

      end;
      N.root.Expand( True );

  end;
begin
  if cxTreeList1.AbsoluteCount > 0 then
  begin
    if Assigned( cxTreeList1.FocusedNode ) then
      추가( cxTreeList1.FocusedNode )
    else
      추가( cxTreeList1.Root );
  end
  else
  begin
    추가( cxTreeList1.Root );
  end;

//  cxTreeList1.FullExpand;
end;

procedure TForm1.버튼_삭제Click(Sender: TObject);
begin
  if Assigned( cxTreeList1.FocusedNode ) then
    cxTreeList1.FocusedNode.Delete

end;

참고만 하시길..

Author: yyjksw