RowStyle (Clase)
Actualización: noviembre 2007
Representa la apariencia de una fila en un diseño de tabla.
Ensamblado: System.Windows.Forms (en System.Windows.Forms.dll)
La clase RowStyle representa las características de la interfaz de usuario (UI) de una fila de un TableLayoutPanel. Los estilos de todas las filas de un TableLayoutPanel se recopilan en la propiedad TableLayoutPanel.RowStyles.
Esta clase simple proporciona el Height y el SizeType de una fila.
En el ejemplo de código siguiente se muestra cómo extraer un RowStyle de una TableLayoutRowStyleCollection.
Este ejemplo de código forma parte de un ejemplo más extenso referente a la clase 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;
}
}
}
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
.NET Framework y .NET Compact Framework no admiten todas las versiones de cada plataforma. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.