Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Otros temas > Trucos
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Los mejores trucos

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 30-06-2006
Avatar de dec
dec dec is offline
Moderador
 
Registrado: dic 2004
Ubicación: Alcobendas, Madrid, España
Posts: 13.107
Poder: 34
dec Tiene un aura espectaculardec Tiene un aura espectacular
Generar "scroll horizontal" con los cursores en un Grid

Pon el siguiente codigo en el evento KeyDown de tu Grid.

NOTA: Solo funcionara si el la property Options tienen RowSelect := TRUE.

Código Delphi [-]
procedure TDBGrid1.KeyDown(var Key: Word; Shift: TShiftState);
begin
  {Scroll con los cursores cuando tiene RowSelect}
  if dgRowSelect in Options then
    if Key in [VK_LEFT,VK_RIGHT] then
     begin

       if Key = VK_LEFTthen
         if (ssCtrl in Shift) then Perform (WM_HSCROLL,SB_PAGELEFT,0)
          else Perform(WM_HSCROLL,SB_LINELEFT,0);

       if key = VK_RIGHT then
         if (ssCtrl in Shift) then Perform(WM_HSCROLL,SB_PAGERIGHT,0)
          else Perform(WM_HSCROLL,SB_LINERIGHT,0);

     end;
     Key:= 0;
  end;
end;
Responder Con Cita
Respuesta



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 19:45:08.


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