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 행에 대 한 합니다.

생성자

RowStyle()

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

RowStyle(SizeType)

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

RowStyle(SizeType, Single)

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

속성

Height

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

SizeType

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

(다음에서 상속됨 TableLayoutStyle)

메서드

Equals(Object)

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

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

기본 해시 함수로 작동합니다.

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

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

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

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

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

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

(다음에서 상속됨 Object)

적용 대상

추가 정보