Inserindo Componentes Dinamicamente

.NET

02/01/2008

Rogério,

De fato é melhor, eu estava usando:

this.tbAbrir.Controls.Add(new System.Windows.Forms.TabPage());
this.tbAbrir.Controls[nI].Name = ´tb´ + dtRow[´ano´];
this.tbAbrir.Controls[nI].Text=dtRow[´ano´].ToString();

Do seu jeito, dá para juntar em uma única instrução a inclusão do componente e o nome identificador do objeto.

Grato.


Mleal

Mleal

Curtidas 0
POSTAR