본문 바로가기
컴퓨터공학/C,C++,C#

[C#] textBox의 커서 위치 구하기

by 무에서 2018. 3. 9.
반응형

textBox에서 커서의 라인과 컬럼 위치를 구하는 코드는 다음과 같다.



  int line = textBox1.GetLineFromCharIndex(textBox1.SelectionStart);

  int column = textBox1.SelectionStart - textBox1.GetFirstCharIndexFromLine(line);



반응형

댓글