C# 35

c# devExpress Winform xtraGrid에서 그리드 내용 찾기

1. c# devExpress Winform xtraGrid에서 그리드 내용 찾기단, 컬럼 2개 이상의 내용 이다. 자체 기능으로 컬럼 필터나,   ctrl+F 로 그리드 내용을 찾을 수도 있고,코딩으로는 gridview1.LocateByDisplayText 이 있다. (https://simplain.tistory.com/461) 2. 코딩 컬럼 2개 이상의 값으로 행을 찾아야 할때는 DataTable의 함수를 이용해서 해결DataTable dt = gridControl1 as DataTable; DataRow[] drs = dt.Select ( string.Format ("col='{0}' and col2=''{1}", c1, c2);int frow = 0;if( drs.length > 0){   fr..

develop 2024.10.14

C# ToolTip 컨트롤에 자기 Name을 tooltip으로 보여주고 싶다.

1. C# ToolTip 컨트롤에 자기 Name을 tooltip으로 보여주고 싶다. 2. 코드ToolTip toolTip = new ToolTip();             toolTip.ShowAlways = true;             toolTip.SetToolTip(컨트롤, 툴팁내용); toolTip.SetToolTip(txt, txt.Name); toolTip.SetToolTip(grd, grd.Name); //이런 속성도 있지만 그닥 사용할 필요는 ...//toolTip.AutoPopDelay = 3000; //toolTip.InitialDelay = 2000; //toolTip.ReshowDelay = 1000; //toolTip.IsBalloon = true; //별로. 3. 둥.

카테고리 없음 2024.10.14

c# devExpress Winform XtraGrid Header BackColor, ForeColor

1. gridControl 의 헤더에 BackColor랑 폰트 컬러를 주고 싶다.폰트 컬러는 컬럼 속성의  ForeColor를 지정 해주면 되는데,BackColor는 그리드의 스킨을 제외하고 적용 해야 되는데 헤더 모양이 바뀌는 좀 그렇다. 2. 그래서 사용하는 것이 CustomDraw 이벤트를 사용해서,BackColor, ForeColor 지정 후 각 각 DrawBackground, DrawString 함수를 호출 해서 다시 그려 준다. private void grd_CustomDrawBandHeaer(..sender, ... e)  {      if (e.Band.Caption == _전역변수)      {          e.Appearance.BackColor = Color.Yellow;     ..

develop 2024.10.14

c# image to binary

Q. 이미지 파일을 바이너리 텍스트로 변환 하고 싶다.richTextBox에 보이게 하고, 텍스트 파일도 만들고 싶다. 참고.  binary to imagehttps://simplain.tistory.com/481 c# binary text to imageprivate void btnTxtToImg_Click(object sender, EventArgs e)         {             string base64String = rTxtBinayText.Text;             try             {                 byte[] imgBytes =simplain.tistory.com 1. private void btnImgToTxt_Click(object sender,..

develop 2024.09.20

c# binary text to image

Q. binary text 를 다시 이미지로 바꾸고 싶다. 참고.  image to binary texthttps://simplain.tistory.com/482 c# image to binaryQ. 이미지 파일을 바이너리 텍스트로 변환 하고 싶다.richTextBox에 보이게 하고, 텍스트 파일도 만들고 싶다. 참고.  binary to imagehttps://simplain.tistory.com/481 c# binary text to imageprivate void btnTxtToImg_Clicksimplain.tistory.com 1.        private void btnTxtToImg_Click(object sender, EventArgs e)         {             stri..

develop 2024.09.20

c# devExpress gridControl에서 click 이벤트가 있어 double Click이 안될 경우

Q.  데브익스프레스 그리드 컨트롤에서클릭, 더블클릭 이벤트 같이 있을 경우 더블 클릭 안됨. 이를 위한 해결책.  A. 그리드 속성을 수정은 안되고 키인은 가능할 상태로 두고, 키인 전에는 클릭, 키인 이후에는 더블클릭이 되게 한다.1. GridView의 OptionsBehavior.Editable 속성을 True 2. private void gridView1_ShownEditor(object sender, System.EventArgs e) {      DevExpress.XtraGrid.Views.Grid.GridView view = sender as DevExpress.XtraGrid.Views.Grid.GridView ;      view.ActiveEditor.DoubleClick -= Act..

develop 2024.09.20

C# 윈폼에서 Panel(Control)을 팝업처럼 움직이게

1. 디자인팝업 타이틀. lablel1panel1  2. 코딩Point clickLocation= new Point(); private void lable1_MouseMove(object sender, MouseEventArgs e) {         if (e.Button == MouseButtons.Left)          {               panel1.Left += e.X - clickLocation.X;               panel1.Top += e.Y - clickLocation.Y;         } } private void lable1_MouseDown(object sender, MouseEventArgs e) {         if (e.Button == MouseBu..

develop 2024.09.12
반응형