Skip to content

Commit ccfb61c

Browse files
committed
Fixed issue #1187
1 parent d3c0e71 commit ccfb61c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Source/VirtualTrees.StyleHooks.pas

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,6 @@ procedure TVclStyleScrollBarsHook.CalcScrollBarsRect();
195195
constructor TVclStyleScrollBarsHook.Create(AControl: TWinControl);
196196
begin
197197
inherited;
198-
InitScrollBars;
199-
200198
{$ifdef NOT_USE_VCL_STYLEHOOK}
201199
VertSliderState := tsThumbBtnVertNormal;
202200
VertUpState := tsArrowBtnUpNormal;
@@ -244,6 +242,9 @@ procedure TVclStyleScrollBarsHook.UpdateScroll;
244242
PaddingSize: Integer;
245243
BorderSize: Integer;
246244
begin
245+
if VertScrollWnd = nil then
246+
InitScrollBars();
247+
247248
HeaderHeight := 0;
248249
if (hoVisible in TBaseVirtualTree(Control).Header.Options) then
249250
Inc(HeaderHeight, TBaseVirtualTree(Control).Header.Height);

0 commit comments

Comments
 (0)