TableLayoutColumnStyleCollection 클래스

정의

개체를 저장하는 ColumnStyle 컬렉션입니다.

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

예제

다음 예제에서는 에 대해 설정하는 ColumnStyle 방법을 보여 있습니다 TableLayoutColumnStyleCollection. 이 코드 예제는 컨트롤에 제공된 더 큰 예제의 TableLayoutPanel 일부입니다.

private void toggleColumnStylesBtn_Click(
    System.Object sender, 
    System.EventArgs e)
{
    TableLayoutColumnStyleCollection styles = 
        this.TableLayoutPanel1.ColumnStyles;

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

            // Set the column width to be a percentage
            // of the TableLayoutPanel control's width.
            style.Width = 33;
        }
        else
        {
            // Set the column width to 50 pixels.
            style.SizeType = SizeType.Absolute;
            style.Width = 50;
        }
    }
}
Private Sub toggleColumnStylesBtn_Click( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles toggleColumnStylesBtn.Click

    Dim styles As TableLayoutColumnStyleCollection = _
    Me.TableLayoutPanel1.ColumnStyles

    For Each style As ColumnStyle In styles

        If style.SizeType = SizeType.Absolute Then

            style.SizeType = SizeType.AutoSize

        ElseIf style.SizeType = SizeType.AutoSize Then

            style.SizeType = SizeType.Percent

            ' Set the column width to be a percentage
            ' of the TableLayoutPanel control's width.
            style.Width = 33

        Else

            ' Set the column width to 50 pixels.
            style.SizeType = SizeType.Absolute
            style.Width = 50

        End If

    Next

End Sub

설명

클래스는 TableLayoutColumnStyleCollection 연결된 TableLayoutPanel열에 대해 설명하는 데 사용되는 모든 스타일의 컬렉션을 나타냅니다.

속성

Name Description
Count

에 실제로 포함된 TableLayoutStyleCollection스타일 수를 가져옵니다.

(다음에서 상속됨 TableLayoutStyleCollection)
Item[Int32]

지정된 인덱스에서 ColumnStyle 값을 가져오거나 설정합니다.

메서드

Name Description
Add(ColumnStyle)

에 항목을 TableLayoutColumnStyleCollection추가합니다.

Add(TableLayoutStyle)

현재 컬렉션의 끝에 새 TableLayoutStyle 컬렉션을 추가합니다.

(다음에서 상속됨 TableLayoutStyleCollection)
Clear()

연결된 TableLayoutPanel 컬렉션에서 컬렉션을 연결 해제하고 컬렉션을 비웁니다.

(다음에서 상속됨 TableLayoutStyleCollection)
Contains(ColumnStyle)

지정된 ColumnStyle 컬렉션에 있는지 여부를 확인합니다.

Equals(Object)

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

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

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

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

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

(다음에서 상속됨 Object)
IndexOf(ColumnStyle)

에서 특정 항목의 인덱스를 TableLayoutColumnStyleCollection결정합니다.

Insert(Int32, ColumnStyle)

지정된 위치에 삽입 ColumnStyleTableLayoutColumnStyleCollection 합니다.

MemberwiseClone()

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

(다음에서 상속됨 Object)
Remove(ColumnStyle)

에서 특정 ColumnStyle 항목의 첫 번째 항목을 제거합니다 TableLayoutColumnStyleCollection.

RemoveAt(Int32)

컬렉션의 지정된 인덱스에 있는 스타일을 제거합니다.

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

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

(다음에서 상속됨 Object)

명시적 인터페이스 구현

Name Description
ICollection.CopyTo(Array, Int32)

이 메서드에 대한 설명은 메서드를 참조하세요 CopyTo(Array, Int32) .

(다음에서 상속됨 TableLayoutStyleCollection)
ICollection.IsSynchronized

이 메서드에 대한 설명은 속성을 참조하세요 IsSynchronized .

(다음에서 상속됨 TableLayoutStyleCollection)
ICollection.SyncRoot

이 메서드에 대한 설명은 속성을 참조하세요 SyncRoot .

(다음에서 상속됨 TableLayoutStyleCollection)
IEnumerable.GetEnumerator()

이 메서드에 대한 설명은 메서드를 참조하세요 GetEnumerator() .

(다음에서 상속됨 TableLayoutStyleCollection)
IList.Add(Object)

이 메서드에 대한 설명은 메서드를 참조하세요 Add(Object) .

(다음에서 상속됨 TableLayoutStyleCollection)
IList.Contains(Object)

이 메서드에 대한 설명은 메서드를 참조하세요 Contains(Object) .

(다음에서 상속됨 TableLayoutStyleCollection)
IList.IndexOf(Object)

이 메서드에 대한 설명은 메서드를 참조하세요 IndexOf(Object) .

(다음에서 상속됨 TableLayoutStyleCollection)
IList.Insert(Int32, Object)

이 메서드에 대한 설명은 메서드를 참조하세요 Insert(Int32, Object) .

(다음에서 상속됨 TableLayoutStyleCollection)
IList.IsFixedSize

이 메서드에 대한 설명은 속성을 참조하세요 IsFixedSize .

(다음에서 상속됨 TableLayoutStyleCollection)
IList.IsReadOnly

이 메서드에 대한 설명은 속성을 참조하세요 IsReadOnly .

(다음에서 상속됨 TableLayoutStyleCollection)
IList.Item[Int32]

이 메서드에 대한 설명은 속성을 참조하세요 Item[Int32] .

(다음에서 상속됨 TableLayoutStyleCollection)
IList.Remove(Object)

이 메서드에 대한 설명은 메서드를 참조하세요 Remove(Object) .

(다음에서 상속됨 TableLayoutStyleCollection)

확장명 메서드

Name Description
AsParallel(IEnumerable)

쿼리의 병렬 처리를 사용하도록 설정합니다.

AsQueryable(IEnumerable)

IEnumerable IQueryable변환합니다.

Cast<TResult>(IEnumerable)

IEnumerable 요소를 지정된 형식으로 캐스팅합니다.

OfType<TResult>(IEnumerable)

지정된 형식에 따라 IEnumerable 요소를 필터링합니다.

적용 대상

추가 정보