fixed dbgrid do not save and restore scrollbars property

git-svn-id: trunk@8823 -
This commit is contained in:
jesus 2006-02-25 20:29:58 +00:00
parent 847315fcba
commit a85b8947c8

View File

@ -450,7 +450,7 @@ type
//property ParentShowHint;
property PopupMenu;
property ReadOnly;
property Scrollbars;
property Scrollbars default ssBoth;
property ShowHint;
property TabOrder;
property TabStop;
@ -1286,7 +1286,14 @@ begin
ScrollInfo.nMax := aRange;
ScrollInfo.nPos := aPos;
ScrollInfo.nPage := aPage;
SetScrollInfo(Handle, SB_VERT, ScrollInfo, true);
// the redraw argument of SetScrollInfo means under gtk
// if the scrollbar is visible or not, in windows it
// seems to mean if the scrollbar is redrawn or not
// to reflect the scrollbar changes made
SetScrollInfo(Handle, SB_VERT, ScrollInfo,
(ScrollBars in [ssBoth, ssVertical]) or
((Scrollbars in [ssAutoVertical, ssAutoBoth]) and (aRange>aPAge))
);
FOldPosition := aPos;
{$ifdef dbgdbgrid}