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
  #2  
Antiguo 18-02-2018
Avatar de ecfisa
ecfisa ecfisa is offline
Moderador
 
Registrado: dic 2005
Ubicación: Tres Arroyos, Argentina
Posts: 10.508
Poder: 38
ecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to behold
Hola.

Fijate si este ejemplo con tres TStringGrid te resulta útil:
Código Delphi [-]
...
type
  TForm1 = class(TForm)
    StringGrid1: TStringGrid;
    StringGrid2: TStringGrid;
    StringGrid3: TStringGrid;
    procedure FormCreate(Sender: TObject);
    procedure sgTopLeftChanged(Sender: TObject);
  private
  public
  end;

var
  Form1: TForm1;

implementation {$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
var
  i: Integer;
begin
  StringGrid1.ColCount := 3;
  StringGrid1.RowCount := 10;
  StringGrid2.ColCount := 3;
  StringGrid2.RowCount := 10;
  StringGrid3.ColCount := 3;
  StringGrid3.RowCount := 10;

  for i := 0 to StringGrid1.RowCount-1 do
  begin
    StringGrid1.Rows[i].CommaText := IntToStr(i)+','+IntToStr(i+1)+','+IntToStr(i+2);
    StringGrid2.Rows[i].CommaText := StringGrid1.Rows[i].CommaText;
    StringGrid3.Rows[i].CommaText := StringGrid1.Rows[i].CommaText;
  end;

  StringGrid1.OnTopLeftChanged := sgTopLeftChanged;
  StringGrid2.OnTopLeftChanged := sgTopLeftChanged;
  StringGrid3.OnTopLeftChanged := sgTopLeftChanged;
end;

procedure TForm1.sgTopLeftChanged(Sender: TObject);
var
  i : Integer;
begin
  for i := 0 to ControlCount-1 do
    if (Controls[i] is TStringGrid)and(Controls[i] <> Sender) then
      TStringGrid(Controls[i]).TopRow := TStringGrid(Sender).TopRow
end;
Funciona con mouse sobre el ScrollBar tanto como con las teclas down/up.

Salida:


Saludos
__________________
Daniel Didriksen

Guía de estilo - Uso de las etiquetas - La otra guía de estilo ....
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

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Mover dos formularios al mismo tiempo santus OOP 3 01-08-2008 19:38:29
Como programar un Scroll bar Vertical TKW04 OOP 13 15-08-2007 16:37:38
Mover carpeta y todo su contenido MaMu API de Windows 10 03-06-2007 05:08:04
Situar el Cursor y mover el Scroll de un TRichEdit dec Trucos 0 14-07-2006 14:45:01
Imprimir un form con scroll vertical javp Impresión 0 24-02-2005 15:54:42


La franja horaria es GMT +2. Ahora son las 17:42:52.


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