mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-15 11:39:27 +02:00
fixed dbgrid do not save and restore scrollbars property
git-svn-id: trunk@8823 -
This commit is contained in:
parent
847315fcba
commit
a85b8947c8
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user