mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 20:20:16 +02:00
LCL: Change DebugLn calls in TCustomTreeView.UpdateScrollbars.
git-svn-id: trunk@52604 -
This commit is contained in:
parent
7e929ec112
commit
a3fd36f97b
@ -4168,6 +4168,7 @@ begin
|
|||||||
if not HandleAllocated or (Items.FUpdateCount>0) then
|
if not HandleAllocated or (Items.FUpdateCount>0) then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
|
//DebugLn('* TCustomTreeView.UpdateScrollbars Enter *');
|
||||||
if ScrolledLeft>GetMaxScrollLeft then ScrolledLeft:=GetMaxScrollLeft;
|
if ScrolledLeft>GetMaxScrollLeft then ScrolledLeft:=GetMaxScrollLeft;
|
||||||
if ScrolledTop>GetMaxScrollTop then ScrolledTop:=GetMaxScrollTop;
|
if ScrolledTop>GetMaxScrollTop then ScrolledTop:=GetMaxScrollTop;
|
||||||
Exclude(FStates,tvsScrollbarChanged);
|
Exclude(FStates,tvsScrollbarChanged);
|
||||||
@ -4183,25 +4184,23 @@ begin
|
|||||||
ScrollInfo.nPage := Max(1,(ClientWidth-ScrollBarWidth)-2*BorderWidth);
|
ScrollInfo.nPage := Max(1,(ClientWidth-ScrollBarWidth)-2*BorderWidth);
|
||||||
ScrollInfo.nMax := Max(1,GetMaxScrollLeft+integer(ScrollInfo.nPage)-1);
|
ScrollInfo.nMax := Max(1,GetMaxScrollLeft+integer(ScrollInfo.nPage)-1);
|
||||||
ScrollInfo.nPos := Max(FScrolledLeft,0);
|
ScrollInfo.nPos := Max(FScrolledLeft,0);
|
||||||
//DebugLn(['TCustomTreeView.UpdateScrollbars nPage=',ScrollInfo.nPage,',nMax=',ScrollInfo.nMax,' fScrollBars=',ord(fScrollBars)]);
|
|
||||||
if not CompareMem(@ScrollInfo,@FLastHorzScrollInfo,SizeOf(TScrollInfo))
|
if not CompareMem(@ScrollInfo,@FLastHorzScrollInfo,SizeOf(TScrollInfo))
|
||||||
then begin
|
then begin
|
||||||
if (fScrollBars in [ssAutoBoth, ssAutoHorizontal])
|
if (fScrollBars in [ssAutoBoth, ssAutoHorizontal])
|
||||||
and (ScrollInfo.nPage>=cardinal(ScrollInfo.nMax)) then begin
|
and (ScrollInfo.nPage>=cardinal(ScrollInfo.nMax)) then begin
|
||||||
|
//DebugLn(['TCustomTreeView.UpdateScrollbars Hide Horizontal.']);
|
||||||
FLastHorzScrollInfo.cbSize:=0;
|
FLastHorzScrollInfo.cbSize:=0;
|
||||||
SetShowScrollBar(SB_HORZ, false);
|
SetShowScrollBar(SB_HORZ, false);
|
||||||
end else begin
|
end else begin
|
||||||
|
//DebugLn(['TCustomTreeView.UpdateScrollbars Show Horizontal: nMin=',ScrollInfo.nMin,
|
||||||
|
//' nMax=',ScrollInfo.nMax,' nPage=',ScrollInfo.nPage,
|
||||||
|
//' nPos=',ScrollInfo.nPos,' GetMaxScrollLeft=',GetMaxScrollLeft,
|
||||||
|
//' ClientW=',ClientWidth, ' MaxRight=',FMaxRight]);
|
||||||
FLastHorzScrollInfo:=ScrollInfo;
|
FLastHorzScrollInfo:=ScrollInfo;
|
||||||
SetShowScrollBar(SB_HORZ, true);
|
SetShowScrollBar(SB_HORZ, true);
|
||||||
SetScrollInfo(Handle, SB_HORZ, ScrollInfo, true);
|
SetScrollInfo(Handle, SB_HORZ, ScrollInfo, true);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
//DebugLn('>>>>>>>>>> [TCustomTreeView.UpdateScrollbars] nMin=',ScrollInfo.nMin,
|
|
||||||
//' nMax=',ScrollInfo.nMax,' nPage=',ScrollInfo.nPage,
|
|
||||||
//' nPos=',ScrollInfo.nPos,' GetMaxScrollLeft=',GetMaxScrollLeft,
|
|
||||||
//' ClientW=',ClientWidth,
|
|
||||||
//' MaxRight=',FMaxRight
|
|
||||||
//);
|
|
||||||
end else begin
|
end else begin
|
||||||
FLastHorzScrollInfo.cbSize:=0;
|
FLastHorzScrollInfo.cbSize:=0;
|
||||||
SetShowScrollBar(SB_HORZ,false);
|
SetShowScrollBar(SB_HORZ,false);
|
||||||
@ -4221,19 +4220,20 @@ begin
|
|||||||
then begin
|
then begin
|
||||||
if (fScrollBars in [ssAutoBoth, ssAutoVertical])
|
if (fScrollBars in [ssAutoBoth, ssAutoVertical])
|
||||||
and (ScrollInfo.nPage>=cardinal(ScrollInfo.nMax)) then begin
|
and (ScrollInfo.nPage>=cardinal(ScrollInfo.nMax)) then begin
|
||||||
|
//DebugLn(['TCustomTreeView.UpdateScrollbars Hide Vertical.']);
|
||||||
FLastVertScrollInfo.cbSize:=0;
|
FLastVertScrollInfo.cbSize:=0;
|
||||||
SetShowScrollBar(SB_VERT, false);
|
SetShowScrollBar(SB_VERT, false);
|
||||||
end else begin
|
end else begin
|
||||||
|
//DebugLn(['TCustomTreeView.UpdateScrollbars Show Vertical: nMin=',ScrollInfo.nMin,
|
||||||
|
//' nMax=',ScrollInfo.nMax,' nPage=',ScrollInfo.nPage,
|
||||||
|
//' nPos=',ScrollInfo.nPos,' GetMaxScrollLeft=',GetMaxScrollTop,
|
||||||
|
//' ClientH=',ClientHeight]);
|
||||||
FLastVertScrollInfo:=ScrollInfo;
|
FLastVertScrollInfo:=ScrollInfo;
|
||||||
SetShowScrollBar(SB_VERT, true);
|
SetShowScrollBar(SB_VERT, true);
|
||||||
SetScrollInfo(Handle, SB_VERT, ScrollInfo, true);
|
SetScrollInfo(Handle, SB_VERT, ScrollInfo, true);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
//DebugLn('>>>>>>>>>> [TCustomTreeView.UpdateScrollbars] Vert On nMin=',dbgs(ScrollInfo.nMin),
|
|
||||||
//' nMax=',dbgs(ScrollInfo.nMax),' nPage=',dbgs(ScrollInfo.nPage),
|
|
||||||
//' nPos=',dbgs(ScrollInfo.nPos),' GetMaxScrollTop=',dbgs(GetMaxScrollTop));
|
|
||||||
end else begin
|
end else begin
|
||||||
//DebugLn('>>>>>>>>>> [TCustomTreeView.UpdateScrollbars] Vert Off ');
|
|
||||||
FLastVertScrollInfo.cbSize:=0;
|
FLastVertScrollInfo.cbSize:=0;
|
||||||
SetShowScrollBar(SB_VERT,false);
|
SetShowScrollBar(SB_VERT,false);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user