DataGridViewCell.MeasureTextSize 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정된 특성이 주어진 경우 지정된 텍스트의 높이와 너비를 가져옵니다.
public:
static System::Drawing::Size MeasureTextSize(System::Drawing::Graphics ^ graphics, System::String ^ text, System::Drawing::Font ^ font, System::Windows::Forms::TextFormatFlags flags);
public static System.Drawing.Size MeasureTextSize (System.Drawing.Graphics graphics, string text, System.Drawing.Font font, System.Windows.Forms.TextFormatFlags flags);
static member MeasureTextSize : System.Drawing.Graphics * string * System.Drawing.Font * System.Windows.Forms.TextFormatFlags -> System.Drawing.Size
Public Shared Function MeasureTextSize (graphics As Graphics, text As String, font As Font, flags As TextFormatFlags) As Size
매개 변수
- text
- String
측정할 텍스트입니다.
- flags
- TextFormatFlags
텍스트에 적용할 TextFormatFlags 값의 비트 조합입니다.
반환
텍스트의 높이와 너비를 나타내는 Size입니다.
예외
flags
가 TextFormatFlags 값의 유효한 비트 조합이 아닙니다.
설명
여러 줄이 필요하고 지정된 서식 지정이 허용되는 경우 반환되는 크기에는 모든 줄의 결합된 높이가 포함됩니다.