Este artigo foi traduzido por máquina. Coloque o ponteiro do mouse sobre as frases do artigo para ver o texto original. Mais informações. |
Tradução
Original
|
Classe TableLayoutRowStyleCollection
Uma coleção que armazena RowStyle objetos.
Assembly: System.Windows.Forms (em System.Windows.Forms.dll)
The TableLayoutRowStyleCollection classe representa a coleção de todos os estilos usados para descrever as linhas de um associado TableLayoutPanel.
O exemplo a seguir mostra como conjunto RowStyle para um TableLayoutRowStyleCollection. Este exemplo de código faz parte de um exemplo maior fornecido para o TableLayoutPanel controle.
privatevoid 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;
}
elseif(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;
}
}
}
System.Object
System.Windows.Forms.TableLayoutStyleCollection
System.Windows.Forms.TableLayoutRowStyleCollection
System.Windows.Forms.TableLayoutStyleCollection
System.Windows.Forms.TableLayoutRowStyleCollection
Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
o.NET Framework e.NET Compact Framework não oferecem suporte a todas as versões de cada plataforma. Para obter uma lista de versões suportadas, consulte Requisitos de sistema do .NET framework.
Conteúdo da Comunidade
Adicionar