[code lang=”delphi”]var
info: TScrollInfo;
begin
fillchar(info, sizeof(info), 0);
with info do
begin
cbsize := sizeof(info);
fmask := SIF_ALL;
GetScrollInfo( TheGrid.handle, SB_VERT, info );
fmask := fmask or SIF_PAGE;
nPage := 5 * (nmax-nmin) div TheGrid.RowCount;
//whatever number of cells you consider a ‘page’
end;
setscrollinfo(TheGrid.handle, SB_VERT, info, TRUE);
end;[/code]
[tags]Delphi, Components, StringGrid[/tags]
0 Kommentare zu “New Scrollbar for StringGrid”