본문 바로가기
300x250

C#/Winform34

C# / Winform TreeView TreeView의 항목을 체크박스로 변경 및 체크된 항목 삭제하기. this.treeView.CheckBoxes = true; 를 작성하면 TreeView에 출력되는 노드를 체크박스로 변경할 수 있습니다. SelectedNode.Remove()를 사용하여 여러개의 노드를 체크 후 삭제 시도 시 에러 발생합니다. 여러개 항목을 체크 후 삭제 할 때는 별도의 코드를 작성해야 합니다. private List checkedNodes = new List(); #region Form1() /// /// 생성자 입니다. /// public Form1() { InitializeComponent(); this.addButton.Click += addButton_Click; this.deleteButton.Click += deleteButton_Click; this.deleteAllBut.. 2019. 4. 21.
C# / Winform TreeView TreeView의 노드를 추가, 삭제, 전체 삭제하기. 추가 버튼 / 삭제 버튼 / 전체 삭제 버튼을 클릭하여 TreeView의 노드를 추가, 삭제 그리고 전체 삭제를 할 수 있습니다. #region Form1() /// /// 생성자 입니다. /// public Form1() { InitializeComponent(); this.addButton.Click += addButton_Click; this.deleteButton.Click += deleteButton_Click; } #endregion #region addButton_Click(sender, e) /// /// 추가 버튼 입니다. /// /// 이벤트 발생자 입니다. /// 이벤트 인자 입니다. private void addButton_Click(object sender, System.Event.. 2019. 4. 21.
C# / Winform TreeView TreeView 생성하기. Winform에 있는 TreeView 컨트롤을 생성합니다. #region Form1() /// /// 생성자 입니다. /// public Form1() { InitializeComponent(); CreateTreeView(); } #endregion #region CreateTreeView() /// /// 트리뷰를 생성합니다. /// private void CreateTreeView() { this.exampleTreeView.BeginUpdate(); this.exampleTreeView.Nodes.Add("가"); this.exampleTreeView.Nodes[0].Nodes.Add("가-1"); this.exampleTreeView.Nodes[0].Nodes.Add("가-2"); this.ex.. 2019. 4. 21.
DB에서의 NULL과 C# 에서의 NULL의 차이 C#에서의 NULL은 (ex: string a = null) 객체에 대한 참조가 없다는 것을 의미하며 DB안에서의 NULL은 존재하지 않는 데이터베이스의 열을 의미합니다. 즉 비어 있는 하나의 값으로 인정이 됩니다. 2019. 4. 7.
300x250