[SOLVED] TControlScrollBar.ClientSize logic wrong? lazarus / 31-LCL ---------------------------------------------------------------------- dsiders · 2020-05-23 16:52 I stumbled across this in controlscrollbar.inc: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i function TControlScrollBar.ClientSize: integer;begin  if Kind = sbVertical then    Result := FControl.ClientWidth  else    Result := FControl.ClientHeight;end;  It seems to return the wrong value for the orientation in Kind. A vertical scroll bar should be getting the Height of the control, and not its Width.  And a horizontal one would be using the Width and not the Height. Right? Or have I missed something obvious? ---------------------------------------------------------------------- jamie · 2020-05-23 17:01 Well kind of twisted but that is how things are .. ---------------------------------------------------------------------- wp · 2020-05-23 17:39 No I think this is correct, look at the comments in the interface declaration. It's not about the size of the scrollbar but about the control it is attached to. Assume a vertical scrollbar. Then the height of the client is equal to the height of the scrollbar - if TControlScrollbar.clientSize would return that the value would be needless. But when the width of the client is returned by the function TControlScrollbar.ClientSize then this is useful information. ---------------------------------------------------------------------- dsiders · 2020-05-23 18:03 After looking at ClientSizeWithBar, ClientSizeWithoutBar, and how it's being used in TScrollingWinControl... I see the error in my assumption. No problem, so problem solved. Thanks.