다음을 통해 공유


RowStyle 클래스

정의

테이블 레이아웃에서 행의 모양과 느낌을 나타냅니다.

public ref class RowStyle : System::Windows::Forms::TableLayoutStyle
public class RowStyle : System.Windows.Forms.TableLayoutStyle
type RowStyle = class
    inherit TableLayoutStyle
Public Class RowStyle
Inherits TableLayoutStyle
상속

예제

다음 코드 예제에서는 에서 추출 하는 RowStyle 방법을 보여 줍니다 TableLayoutRowStyleCollection.

이 코드 예제는 클래스에 제공된 더 큰 예제의 TableLayoutPanel 일부입니다.

private void toggleRowStylesBtn_Click(
    System.Object sender, 
    System.EventArgs e)
{
    TableLayoutRowStyleCollection styles = 
        this.TableLayoutPanel1.RowStyles;

    foreach( RowStyle style in styles )
    {
        if (style.SizeType==SizeType.Absolute)
        {
            style.SizeType = SizeType.AutoSize;
        }
        else if(style.SizeType==SizeType.AutoSize)
        {
            style.SizeType = SizeType.Percent;

            // Set the row height to be a percentage
            // of the TableLayoutPanel control's height.
            style.Height = 33;
        }
        else
        {

            // Set the row height to 50 pixels.
            style.SizeType = SizeType.Absolute;
            style.Height = 50;
        }
    }
}
Private Sub toggleRowStylesBtn_Click( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles toggleRowStylesBtn.Click

    Dim styles As TableLayoutRowStyleCollection = _
    Me.TableLayoutPanel1.RowStyles

    For Each style As RowStyle In styles

        If style.SizeType = SizeType.Absolute Then

            style.SizeType = SizeType.AutoSize

        ElseIf style.SizeType = SizeType.AutoSize Then

            style.SizeType = SizeType.Percent

            ' Set the row height to be a percentage
            ' of the TableLayoutPanel control's height.
            style.Height = 33

        Else

            ' Set the row height to 50 pixels.
            style.SizeType = SizeType.Absolute
            style.Height = 50

        End If

    Next

End Sub

설명

클래스는 RowStyle 행의 UI(사용자 인터페이스) 특성을 TableLayoutPanel나타냅니다. 속성에 있는 모든 행의 TableLayoutPanel 스타일이 수집 TableLayoutPanel.RowStyles 됩니다.

이 간단한 클래스는 행 및 HeightSizeType 행을 제공합니다.

생성자

Name Description
RowStyle()

클래스의 인스턴스를 RowStyle 기본 상태로 초기화합니다.

RowStyle(SizeType, Single)

제공된 SizeType 값과 높이 값을 사용하여 클래스의 RowStyle 인스턴스를 초기화합니다.

RowStyle(SizeType)

제공된 SizeType 값을 사용하여 클래스의 RowStyle 인스턴스를 초기화합니다.

속성

Name Description
Height

행의 높이를 가져오거나 설정합니다.

SizeType

포함된 테이블을 기준으로 행 또는 열의 크기를 조정하는 방법을 나타내는 플래그를 가져오거나 설정합니다.

(다음에서 상속됨 TableLayoutStyle)

메서드

Name Description
Equals(Object)

지정된 개체가 현재 개체와 같은지 여부를 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 사용됩니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상

추가 정보