Ver Mensaje Individual
  #2  
Antiguo 02-06-2003
andres1569 andres1569 is offline
Miembro
 
Registrado: may 2003
Posts: 908
Reputación: 22
andres1569 Va por buen camino
Hola:

Una idea:

En el OnCreate del Form
Código:
for i:=Low(Bts) to High(Bts) do
  Bts[i] := nil;
en el evento del menu
Código:
for i:=Low(Bts) to High(Bts) + 1 do
  if i > High(Bts) then
    ShowMessage ('No caben más botones. Lo siento');
  else if Bts[i] := nil then
  begin
    Bts[i] := TButton.Create (Self);
    with Bts[i] do
    begin
      Parent := Self;
      Caption := 'Soy el Botón Nº ' + IntToStr(i);
      Left := i * 64;
      Top := 30;
      Visible := TRUE;
    end;
    break;
  end

Un Saludo
Responder Con Cita