Ver Mensaje Individual
  #1  
Antiguo 04-10-2011
juaarias juaarias is offline
Miembro
NULL
 
Registrado: nov 2010
Posts: 50
Reputación: 0
juaarias cantidad desconocida en este momento
comparar un texto de un listbox con un texto de un edit

Código Delphi [-]
procedure TfrmAgregar.btnAceptarClick(Sender: TObject);
var
i:integer;
begin
    //controlar que el producto no este cargado
    for i := 0 to frmInicio.lstProductos.Count - 1 do
      if frmInicio.lstProductos.items[i].text??? = txtPreNuevo.text then  QUIERO SABER SI LA PALABRA ESTA EN LA LISTA ENTONCES DIGO QUE YA ESTA CARGADA
         showmessage('El producto ya esta cargado')
         else begin
         //paso el producto y el precio nuevo al inicio
            frmInicio.lstPrecios.Items.Add  (txtPreNuevo.text);
            frmInicio.lstProductos.Items.Add (txtProdNuevo.text);
            close;
         end;
      end;
Responder Con Cita