Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Varios (https://www.clubdelphi.com/foros/forumdisplay.php?f=11)
-   -   ScrollBar (https://www.clubdelphi.com/foros/showthread.php?t=17003)

Mario1980 19-12-2004 20:57:35

ScrollBar
 
Hola, alguien sabe como programar el scrollbar para relacionarlo con una tabla,es decir hacer todo lo que hace un scrollBar comun pero aplicado a una tabla, tengo Delphi 2 y tablas paradox 7 . un saludo, GRacias

marcoszorrilla 19-12-2004 23:00:03

Prueba con esto:
Código Delphi [-]
   public
     { Public declarations }
   nReg:Integer;
    
   end;
 
 var
   Form1: TForm1;
 
 implementation
 
 {$R *.DFM}
 
 
 
 procedure TForm1.FormActivate(Sender: TObject);
 begin
 ScrollBar1.Max:=Table1.RecordCount;
 Table1.First;
 nReg:=1;
 end;
 
 procedure TForm1.ScrollBar1Change(Sender: TObject);
 begin
   if ScrollBar1.Position > nReg then
   begin
   Table1.Next;
   nReg:=nReg + 1;
   end
   else
   begin
   Table1.Prior;
   nReg:=nReg - 1;
   end;
 
 end;

Un Saludo.


La franja horaria es GMT +2. Ahora son las 21:42:39.

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