IDE: debug for component palette, carbon needs implementation of ShowScrollInfo

git-svn-id: trunk@45094 -
This commit is contained in:
mattias 2014-05-19 13:55:18 +00:00
parent de34488798
commit d641fda803
3 changed files with 21 additions and 4 deletions

View File

@ -568,8 +568,17 @@ begin
ButtonX:= ((ComponentPaletteBtnWidth*3) div 2) + 2;
//GetClientRect(ScrollBox.Handle,WSClientRect);
//debugln(['TComponentPalette.ReAlignButtons ScrollBox.Bounds=',dbgs(ScrollBox.BoundsRect),' ClientRect=',dbgs(ScrollBox.ClientRect),' WSClientRect=',dbgs(WSClientRect),' VertScrollBar.Size=',ScrollBox.VertScrollBar.Size,' ClientSizeWithoutBar=',ScrollBox.VertScrollBar.ClientSizeWithoutBar,' IsScrollBarVisible=',ScrollBox.VertScrollBar.IsScrollBarVisible]);
{GetClientRect(ScrollBox.Handle,WSClientRect);
debugln(['TComponentPalette.ReAlignButtons ScrollBox.Bounds=',dbgs(ScrollBox.BoundsRect),
' ClientRect=',dbgs(ScrollBox.ClientRect),' WSClientRect=',dbgs(WSClientRect),
' VertScrollBar.Size=',ScrollBox.VertScrollBar.Size,
' ClientSizeWithoutBar=',ScrollBox.VertScrollBar.ClientSizeWithoutBar,
' IsScrollBarVisible=',ScrollBox.VertScrollBar.IsScrollBarVisible,
' HorzScrollBar.Size=',ScrollBox.HorzScrollBar.Size,
' Page=',ScrollBox.HorzScrollBar.Page,
' Range=',ScrollBox.HorzScrollBar.Range,
' IsScrollBarVisible=',ScrollBox.HorzScrollBar.IsScrollBarVisible
]);}
MaxBtnPerRow:=((ScrollBox.VertScrollBar.ClientSizeWithoutBar - ButtonX) div ComponentPaletteBtnWidth);
// If we need to wrap, make sure we have space for the scrollbar
if MaxBtnPerRow < ButtonTree.Count then

View File

@ -233,10 +233,10 @@ begin
ScrollInfo.nTrackPos := TrackToPolicyMap[FTracking];
SetScrollInfo(ControlHandle, IntfBarKind[Kind], ScrollInfo, NewVisible);
end;
ShowScrollBar(FControl.Handle, IntfBarKind[Kind], NewVisible);
ShowScrollBar(ControlHandle, IntfBarKind[Kind], NewVisible);
{$IFDEF VerboseScrollingWinControl}
//if DebugCondition then
DebugLn(['TControlScrollBar.UpdateScrollBar ',DbgSName(FControl),' ',DbgSName(Self),' ',dbgs(Kind),' FVisible=',FVisible,' Range=',FRange,' FPosition=',FPosition,' FPage=',FPage,' FAutoRange=',FAutoRange,' ShouldVisible=',NewVisible]);
DebugLn(['TControlScrollBar.UpdateScrollBar ',DbgSName(FControl),' ',DbgSName(Self),' ',dbgs(Kind),' FVisible=',FVisible,' Range=',FRange,' FPosition=',FPosition,' FPage=',FPage,' FAutoRange=',FAutoRange,' ShouldVisible=',NewVisible,' IsVisible=',IsScrollBarVisible]);
{$ENDIF}
end;

View File

@ -3927,7 +3927,15 @@ end;
function TCarbonWidgetSet.ShowScrollBar(Handle: HWND; wBar: Integer;
bShow: Boolean): Boolean;
var
CarbonControl: TCarbonControl;
begin
Result:=false;
CarbonControl := TCarbonControl(Handle);
// ToDo:
Result:=inherited ShowScrollBar(Handle, wBar, bShow);
end;