Ver Mensaje Individual
  #4  
Antiguo 26-11-2009
rrf rrf is offline
Miembro
 
Registrado: ago 2003
Ubicación: S/C Tenerife, España
Posts: 454
Reputación: 21
rrf Va por buen camino
Wink

Hola Manuel.

Prueba este código por si es lo que buscabas.

Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
var
  cc : integer ;
begin

                        // Recorre todos los items del combobox
  for cc := 0 to ComboBox1.Items.Count -1
  do
                        // Si el item es igual al texto con el que se compara...
    if ComboBox1.Items [cc] = 'texto a comparar'
      then
        begin
                  // ... entonces, establece ese item del Combobox como el seleccionado...
          ComboBox1.Itemindex := cc ;

          break ;  // ... y sale del bucle "for"
        end ;

end;

Saludos.

Ramón.
Responder Con Cita