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
Este tópico ainda não foi avaliado como - Avalie este tópico

Classe TableLayoutCellPaintEventArgs

Fornece dados para o CellPaint evento.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (em System.Windows.Forms.dll)
public class TableLayoutCellPaintEventArgs : PaintEventArgs

The TableLayoutCellPaintEventArgs classe fornece informações sobre a linha, coluna e limites da célula para oferecer suporte a pintura da célula em tabela.

O exemplo a seguir mostra como um TableLayoutCellPaintEventArgs Para personalizar a aparência de um TableLayoutPanel controle. Este exemplo de código faz parte de um exemplo maior fornecido para o TableLayoutPanel controle.

publicclass DemoTableLayoutPanel : TableLayoutPanel
{
	protectedoverridevoid OnCellPaint(TableLayoutCellPaintEventArgs e)
	{
		base.OnCellPaint(e);

        Control c = this.GetControlFromPosition(e.Column, e.Row);

        if ( c != null )
        {
            Graphics g = e.Graphics;

            g.DrawRectangle(
				Pens.Red, 
				e.CellBounds.Location.X+1,
				e.CellBounds.Location.Y + 1,
				e.CellBounds.Width - 2, e.CellBounds.Height - 2);

			g.FillRectangle(
				Brushes.Blue, 
				e.CellBounds.Location.X + 1, 
				e.CellBounds.Location.Y + 1, 
				e.CellBounds.Width - 2, 
				e.CellBounds.Height - 2);
        };
	}

}


System.Object
  System.EventArgs
    System.Windows.Forms.PaintEventArgs
      System.Windows.Forms.TableLayoutCellPaintEventArgs
Quaisquer membros static (Shared no Visual Basic) públicos deste tipo são thread-safe. Não há garantia de que qualquer membro de instância seja thread-safe.

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.

.NET Framework

Compatível com: 3.5, 3.0, 2.0
Isso foi útil para você?
(1500 caracteres restantes)
Conteúdo da Comunidade Adicionar