ContentAlignment 열거형

정의

그리기 화면에서 콘텐츠의 맞춤을 지정합니다.

public enum class ContentAlignment
public enum ContentAlignment
type ContentAlignment = 
Public Enum ContentAlignment
상속
ContentAlignment

필드

BottomCenter 512

콘텐츠의 세로는 아래쪽에 맞추고, 가로는 가운데 맞춥니다.

BottomLeft 256

콘텐츠의 세로는 아래쪽에 맞추고, 가로는 왼쪽에 맞춥니다.

BottomRight 1024

콘텐츠의 세로는 아래쪽에 맞추고, 가로는 오른쪽에 맞춥니다.

MiddleCenter 32

콘텐츠의 세로는 중간에 맞추고, 가로는 가운데 맞춥니다.

MiddleLeft 16

콘텐츠의 세로는 중간에 맞추고, 가로는 왼쪽에 맞춥니다.

MiddleRight 64

콘텐츠의 세로는 중간에 맞추고, 가로는 오른쪽에 맞춥니다.

TopCenter 2

콘텐츠의 세로는 위쪽에 맞추고, 가로는 가운데 맞춥니다.

TopLeft 1

콘텐츠의 세로는 위쪽에 맞추고, 가로는 왼쪽에 맞춥니다.

TopRight 4

콘텐츠의 세로는 위쪽에 맞추고, 가로는 오른쪽에 맞춥니다.

예제

다음 코드 예제에서는 생성자 및 Size 열거형을 System.Drawing.ContentAlignment 사용 Point.Point 하는 방법을 보여 줍니다. 이 예제를 실행하려면 이 코드를 명명 Label1 된 레이블이 포함된 Windows Form에 붙여넣고 양식 생성자에서 메서드를 호출 InitializeLabel1 합니다.

void InitializeLabel1()
{
   // Set a border.
   Label1->BorderStyle = BorderStyle::FixedSingle;
   
   // Set the size, constructing a size from two integers.
   Label1->Size = System::Drawing::Size( 100, 50 );
   
   // Set the location, constructing a point from a 32-bit integer
   // (using hexadecimal).
   Label1->Location = Point(0x280028);
   
   // Set and align the text on the lower-right side of the label.
   Label1->TextAlign = ContentAlignment::BottomRight;
   Label1->Text = "Bottom Right Alignment";
}
private void InitializeLabel1()
{
    // Set a border.
    Label1.BorderStyle = BorderStyle.FixedSingle;

    // Set the size, constructing a size from two integers.
    Label1.Size = new Size(100, 50);

    // Set the location, constructing a point from a 32-bit integer
    // (using hexadecimal).
    Label1.Location = new Point(0x280028);

    // Set and align the text on the lower-right side of the label.
    Label1.TextAlign = ContentAlignment.BottomRight;
    Label1.Text = "Bottom Right Alignment";
}
Private Sub InitializeLabel1()

    ' Set a border.
    Label1.BorderStyle = BorderStyle.FixedSingle

    ' Set the size, constructing a size from two integers.
    Label1.Size = New Size(100, 50)

    ' Set the location, constructing a point from a 32-bit integer
    ' (using hexadecimal).
    Label1.Location = New Point(&H280028)

    ' Set and align the text on the lower-right side of the label.
    Label1.TextAlign = ContentAlignment.BottomRight
    Label1.Text = "Bottom Right Alignment"
End Sub

적용 대상