Ver Mensaje Individual
  #2  
Antiguo 24-11-2004
Avatar de Neftali [Germán.Estévez]
Neftali [Germán.Estévez] Neftali [Germán.Estévez] is offline
[becario]
 
Registrado: jul 2004
Ubicación: Barcelona - Espańa
Posts: 18.293
Reputación: 10
Neftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en brutoNeftali [Germán.Estévez] Es un diamante en bruto
Utilizando FindComponent puedes obtener un componente a partir de su nombre; En la ayuda de Delphi tienes el siguiente ejemplo:

Código Delphi [-]
var
  i: Integer;
const
  NamePrefix = 'MyEdit';
begin
  for i := 1 to 20 dobegin
    TEdit.Create(Self).Name := NamePrefix + IntToStr(i);
    with TEdit(FindComponent(NamePrefix + IntToStr(i))) do
    begin
      Left := 10;
      Top := i * 20;
      Parent := self;
    end;
  end;

Es casi idéntico al tuyo, simplemente que trabaja con TEdit, y la propiedad que modifica es otra, pero vamos es casi "pastado". Pruébalo y si tienes problemas ya dirás...
__________________
Germán Estévez => Web/Blog
Guía de estilo, Guía alternativa
Utiliza TAG's en tus mensajes.
Contactar con el Clubdelphi

P.D: Más tiempo dedicado a la pregunta=Mejores respuestas.
Responder Con Cita