TcxTreeList의 추가 삭제 부분입니다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
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; |
참고만 하시길..
최신 댓글