Ver Mensaje Individual
  #1  
Antiguo 04-11-2010
cloayza cloayza is offline
Miembro
 
Registrado: may 2003
Ubicación: San Pedro de la Paz, Chile
Posts: 947
Reputación: 25
cloayza Tiene un aura espectacularcloayza Tiene un aura espectacular
Podria ser asi...

Código Delphi [-]
...
  public
    { Public declarations }
    procedure setComboValues(cbox:TComboBox; fInicio, fFinal:Integer);
  end;
...

procedure TForm1.setComboValues(cbox:TComboBox; fInicio, fFinal:Integer);
var i:integer;
begin
     cbox.Items.Clear;
     for I := fInicio to fFinal do
         cbox.Items.Add(IntToStr(i));
end;

procedure TForm1.ComboBox2Enter(Sender: TObject);
begin
     setComboValues(ComboBox2, StrToInt(ComboBox1.Text)+1,50);
end;

procedure TForm1.ComboBox3Enter(Sender: TObject);
begin
     setComboValues(ComboBox3, StrToInt(ComboBox2.Text)+1,50);
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
     setComboValues(ComboBox1, 1,50);
end;

Saludos...
Responder Con Cita