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 ParentShowHint;
property PopupMenu; property PopupMenu;
property ReadOnly; property ReadOnly;
property Scrollbars; property Scrollbars default ssBoth;
property ShowHint; property ShowHint;
property TabOrder; property TabOrder;
property TabStop; property TabStop;
@ -1286,7 +1286,14 @@ begin
ScrollInfo.nMax := aRange; ScrollInfo.nMax := aRange;
ScrollInfo.nPos := aPos; ScrollInfo.nPos := aPos;
ScrollInfo.nPage := aPage; 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; FOldPosition := aPos;
{$ifdef dbgdbgrid} {$ifdef dbgdbgrid}