본문 바로가기
삽질/Delphi

[Delphi] 문자열의 너비 구하기

by 푸딩s 2012. 1. 11.


uses Graphics;

Canvas.TextWidth(str);


ex)

if Canvas.TextWidth(Cells[5, J]) > 220 then
  RowHeights[J] := 16 * ((Canvas.TextWidth(Cells[5, J]) div 220) + 1);


'삽질 > Delphi' 카테고리의 다른 글

[Delphi] IdFTP 한글 인코딩 오류  (0) 2013.04.05
[Delphi] StringGrid - Mouse move Cell hint  (0) 2012.01.11
[Delphi] Socket Error  (1) 2011.08.31
[Delphi] 델파이 예외 처리 클래스  (0) 2011.08.03
[Delphi] 파일 확장자 알아내기  (0) 2011.07.22

댓글