Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #3  
Antiguo 05-10-2005
Avatar de ElDioni
[ElDioni] ElDioni is offline
Miembro Premium
 
Registrado: jul 2005
Ubicación: Murcia (España)
Posts: 935
Poder: 21
ElDioni Va por buen camino
cogi tu procedimiento y lo he modificado un poco

Código Delphi [-]
procedure TGestionped.TxtProveedorKeyUp(Sender: TObject; var Key: Word;
  Shift: TShiftState);
var
  texto , campo : string;
begin
  if key=13 then
    begin
      if adoquery1.IsEmpty=false then
        begin
          txtproveedor.Text:=adoquery1.fieldbyname('proveedor').AsString;
          txtidprov.Text:=adoquery1.fieldbyname('idprov').AsString;
          txtobserv.SetFocus;
        end;
    end
  else
  begin
  if key=8 then
    begin
      if contador>0 then
        begin
          contador:=txtproveedor.SelLength+1;
          contador:=length(txtproveedor.text)-contador;
        end;
    end
  else
    begin
      contador:=length(txtproveedor.text)-txtproveedor.sellength;
    end;
  if adoquery1.IsEmpty=false then
    begin
          texto:=txtproveedor.text;
          campo:=adoquery1.FieldByName('proveedor').AsString;
          Delete(campo,1,length(txtproveedor.text)); //contador);
          txtproveedor.Text:=texto + campo;
          txtproveedor.SelStart:=contador;
          txtproveedor.SelLength:=50; //tamaño del campo
    end;
  end;
end;


Gracias por la ayuda me sirvio de mucho

Última edición por roman fecha: 05-10-2005 a las 17:12:34. Razón: agregar etiquetas [delphi] para mayor legibilidad
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 15:14:48.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi