300x250 전체 글875 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. DevExpress / Winform GridControl의 DataSource에 객체를 바인딩 할 때 Column의 FieldName과 객체의 속성 값 맞추기. 객체를 GridControl의 DataSource에 바인딩 한 후 컬럼 생성 될때 컬럼의 FieldName과 객체의 속성 값이 일치 해야 GridView에 정상적으로 출력됩니다. FiledName과 일치 하지 않을 경우 출력될 때 빈칸으로 출력이 되는 상황이 발생합니다. 아래와 같은 속성들이 있을 때 각 컬럼의 FieldName과 속성들을 매칭한 코드 입니다. this.listGridView.Columns[0].FieldName = "ID"; this.listGridView.Columns[1].FieldName = "Subject"; this.listGridView.Columns[2].FieldName = "UseYN"; this.listGridView.Columns[3].FieldName = "Crea.. 2019. 4. 20. DevExpress / Winform GridView Column Header와 출력 될 행의 폰트 변경 하기. Column Header와 행의 폰트를 변경 할 수 있습니다. // 컬럼 헤더 폰트 변경하기. this.listGridView.Appearance.HeaderPanel.Font = new System.Drawing.Font("나눔고딕코딩", 12F, System.Drawing.FontStyle.Regular); // 행 폰트 변경하기. this.listGridView.Appearance.Row.Font = new System.Drawing.Font("나눔고딕코딩", 12F, System.Drawing.FontStyle.Regular); 2019. 4. 20. DevExpress / Winform SearchControl에 값을 입력하여 CheckedListBoxControl 항목을 필터링 하기. SearchControl에 값을 입력하여 CheckedListBoxControl 항목을 필터링 할 수 있습니다. public partial class Form1 : Form { #region Form1() /// /// 생성자 입니다. /// public Form1() { InitializeComponent(); List item = new List(); for (int i = 0; i < 5; i++) { item.Add(new Sample() { Name = "Sample" + i.ToString() }); } this.checkedListBoxControl1.DataSource = item; this.checkedListBoxControl1.DisplayMember = "Name"; this.che.. 2019. 4. 18. DevExpress / Winform CheckedListBoxControl 전체 선택 및 전체 선택 해제하기. CheckedListBoxControl 에서 전체 선택 및 전체 선택 해제 하기 입니다. public partial class Form1 : Form { #region Form1() /// /// 생성자 입니다. /// public Form1() { InitializeComponent(); this.checkedListBoxControl1.Items.Add("Check All"); this.checkedListBoxControl1.Items.AddRange(new object[] { "가", "나", "다", "라", "마",}); this.checkedListBoxControl1.ItemCheck += checkedListBoxControl1_ItemCheck; } #endregion #region c.. 2019. 4. 18. DevExpress / Winform GridLookUpEdit 컨트롤에 새로운 값을 추가하기. GridLookUpEdit 컨트롤에 새로운 값을 추가할 수 있습니다. 기존의 존재하는 값을 사용하거나 새로운 문자열을 입력할 수 있습니다. using DevExpress.XtraEditors; using System; using System.Collections.Generic; using System.Windows.Forms; namespace WindowsFormsApp4 { public partial class Form1 : Form { #region Form1() /// /// 생성자 입니다. /// public Form1() { InitializeComponent(); InitLookUpEdit(); InitGridLookUpEdit(); } #endregion #region InitLookUpE.. 2019. 4. 18. DevExpress / Winform CheckedComboBoxEdit에 열겨형 값 표시하기. CheckedComboBoxEdit에 열겨형 값을 표시할 수 있습니다. using DevExpress.XtraEditors; using System; using System.Windows.Forms; namespace WindowsFormsApp4 { public partial class Form1 : Form { /// /// Color 열거형 입니다. /// enum MyColors { None = 0x00, Black = 0x01, White = 0x02, Blue = 0x04, Yellow = 0x08, Green = Blue | Yellow } #region Form1() /// /// 생성자 입니다. /// public Form1() { InitializeComponent(); this.che.. 2019. 4. 17. DevExpress / Winform ComboBoxEdit 클래스 ComboBoxEdit의 목록에 마우스를 가져다 대었을 때 선택된 목록의 글씨 Bold 처리 하기. ComboBoxEdit의 목록에 마우스를 대었을 때 Bold 처리 할 수 있습니다. #region comboBoxEdit1_DrawItem(sender, e) /// /// 사용자 지정 그림을 수행합니다. /// /// 이벤트 발생자 입니다. /// 이벤트 인자 입니다. private void comboBoxEdit1_DrawItem(object sender, ListBoxDrawItemEventArgs e) { if ((e.State & DrawItemState.Selected) > 0) { Font boldFont = new Font(e.Appearance.Font.FontFamily, e.Appearance.Font.Size, FontStyle.Bold); e.Graphics.DrawString(e.. 2019. 4. 17. 이전 1 ··· 102 103 104 105 106 107 108 ··· 110 다음 300x250