View Issue Details

IDProjectCategoryView StatusLast Update
0027449LazarusLCLpublic2017-03-19 11:11
ReporterDr.Theopolis Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
PlatformMacOSOS X 
Product Version1.2.6 
Summary0027449: Scrollbars always visible in scrolling controls
DescriptionThe vertical and horizontal scrollbars are always visible in forms when AutoScroll is set, and also in scroll boxes at all times.
Steps To ReproduceStart a new project, set form AutoScroll to true. Run it, and with an empty form the scrollbars are visible.

For scrollboxes, put an empty scrollbox on a form. Run it, and the scrollbox scrollbars are visible.
Additional InformationI have tested this on the following:

Lazarus 1.2.6, fpc 2.6.4, OS X 10.7.5 - has the problem
Lazarus SVN rev 47650 , OS X 10.7.5 and 10.5.5 - has the problem
Lazarus 1.0.10 - does not have the problem

In the unit scrollingwincontrol.inc, the procedure TScrollingWinControl.ComputeScrollbars went through some changes at some point. I have been looking into this issue extensively but I am having a hard time finding out exactly what the problem is. It seems to have something to do with client sizes with/without scrollbar. I can't say that there is anything wrong with the way ComputeScrollbars is coded, but through experimenting I find the following to fix the problem for OS X for forms and scrollboxes. The procedure is common to all widgetsets so the following may not be the appropriate fix.

procedure TScrollingWinControl.ComputeScrollbars;

  procedure UpdateBar(aBar: TControlScrollBar; aClientSize: integer);
  begin
    aBar.FPage := Min(aClientSize, Max(1,Min(aClientSize, High(HorzScrollbar.FPage))));
    aBar.FAutoRange := Max(0, aBar.Range - aClientSize);
  end;
  
var
  ClientW: Integer;
  ClientH: Integer;
begin
  CalculateAutoRanges;
  ClientW := VertScrollBar.ClientSize;
  ClientH := HorzScrollBar.ClientSize;
  UpdateBar(HorzScrollBar,ClientW);
  UpdateBar(VertScrollBar,ClientH);
end;
TagsNo tags attached.
Fixed in Revision
LazTarget
WidgetsetCarbon
Attached Files

Relationships

has duplicate 0030910 resolvedJuha Manninen Scroll Bars always visible on TScrollBox 

Activities

Juha Manninen

2017-03-18 15:40

developer   ~0099018

Please fix it in widgetset code and provide a patch.

Issue History

Date Modified Username Field Change
2015-02-12 01:21 Dr.Theopolis New Issue
2017-03-18 15:38 Juha Manninen Relationship added has duplicate 0030910
2017-03-18 15:40 Juha Manninen Note Added: 0099018