[Solved] How to calc width of OS scrollbar lazarus / 31-LCL ---------------------------------------------------------------------- AlexTP · 2018-03-26 17:11 E.g. in Listview OS scrollbar added if needed. How to calc it's width (of vert var) on all WS'es? ---------------------------------------------------------------------- Blaazen · 2018-03-26 17:28 I did a test on Linux+Qt (I hope it will work for other WS'es too). ListBox.Width gives 100 (default). Empty ListBox.ClientWIdth gives 96 (2px border on both sides). ListBox.ClientWidth with vertical scrollbar gives 80 (2*2px border + 16px scrollbar). Alternatively, create a TScrollBar (Standart palette). Its default height is also 16. ---------------------------------------------------------------------- wp · 2018-03-26 17:49 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 uses  LCLIntf, LCLType;var  h, w: Integer;...  h := GetSystemMetrics(SM_CYHSCROLL);  w := GetSystemMetrics(SM_CXVSCROLL);Looks like a Windows call, but is in LCLIntf and, therefore, should be cross-platform. ---------------------------------------------------------------------- Blaazen · 2018-03-26 18:01 @ h := GetSystemMetrics(SM_CYHSCROLL);   w := GetSystemMetrics(SM_CXVSCROLL); I tried now, works well for Qt and GTk2. Also the trick with ClientWidth works with GTk2.