TlistView.Scrollbars lazarus / 31-LCL ---------------------------------------------------------------------- Mike.Cornflake · 2014-10-27 14:11 Does anyone know how to force the scrollbars on a TListView to always be visible? Under Windows (tested with GTK2, QT and Win32) TListView.Scrollbars is ignored (and in fact the default is ssBoth)...  I'll post an item to Mantis in the next day or two, but I'm wondering if anyone has a workaround... ---------------------------------------------------------------------- Never · 2014-10-27 15:29 i do not know if i got this right but my 2cents if you set lv style to report set scrollbars=ssBoth and the header width is set to a value biger than the with of the lv the hscrollbar will be there also  if the sum of items height are more than the lv height the vscroolbar will there too beond this i'm pretty sure there is a windows api ShowScrollBar or something like this as for gtk and qt i can't help sorry ---------------------------------------------------------------------- Mike.Cornflake · 2014-10-27 15:38 Thanks for this.  My understanding of the Scrollbars property differs to yours.  I'm unsure who's right  What you've just described is what I would expect if Scrollbars = ssAutoBoth.  For ssBoth, I would have expected both Scrollbars to be visible at all times.. ---------------------------------------------------------------------- Never · 2014-10-27 15:45 imho they are visible when there is a need for it Edit**:scrollbars=ssBoth should adjust the header width automativaly to be longer than the lv width as long as the items*itemheight is longer than the lv height if it doesn't force it by manual setting the header width Edit**2:the above will force the hscrollbar to show you can add  if you wish blank items in the list to force the vscrollbar too and if do not want the header at all set showcolumnheaders to false ---------------------------------------------------------------------- Mike.Cornflake · 2014-10-27 23:40 I'm replying without double checking with the IDE.  Not a good thing :-) I think TMemo correctly implements Scrollbars.  Have a look at the difference between ssAutoBoth and ssBoth there.  You're telling me the way the ListView currently operates, I'm coming from a point of view of how I *think* it should operate, and I think it should operate as per TMemo functionality. I've worked around my issue for now (by disabling some functionality), and I've made a note to return to TListView.Scrollbars and investigate further... ---------------------------------------------------------------------- derek.john.evans · 2014-10-28 09:45 This is the code from: interfaces\win32\win32wscustomlistview.inc (1250,31) class procedure TWin32WSCustomListView.SetScrollBars(const ALV: TCustomListView;... 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 class procedure TWin32WSCustomListView.SetScrollBars(const ALV: TCustomListView; const AValue: TScrollStyle);begin  if not WSCheckHandleAllocated(ALV, 'SetScrollBars')  then Exit;   // we only can hide all scrollbars.  if AValue = ssNone  then UpdateStyle(ALV.Handle, LVS_NOSCROLL, LVS_NOSCROLL)  else UpdateStyle(ALV.Handle, LVS_NOSCROLL, 0);end;   Mmmm. Note: we only can hide all scrollbars. ---------------------------------------------------------------------- Mike.Cornflake · 2014-10-28 12:44 http://msdn.microsoft.com/en- us/library/windows/desktop/bb774739(v=vs.85).aspx Hmmm.    And according to MSDN, it doesn't work for vsReport, which I forgot to mention was the ViewStyle I'm using. Many thanks Derek... ---------------------------------------------------------------------- ChrisF · 2014-10-28 16:48 If TListView is based upon the native Windows Listview control (which is highly probable), you can't get what you want. You can indeed remove them (i.e. LVS_NOSCROLL property) and only for some styles of Listview, as indicated in the Microsoft documentation. But there is no Windows option to make them always visible. So, unless you are in the mood to code your own TListView, or at least to derivate it (i.e. User control = 1 TListView + 2 TScrollBar Lazarus controls), I'm afraid there are no other simple ways. **Edit ** And even this solution (i.e "external" TScrollBar controls) will be complicate if you can't apply the LVS_NOSCROLL property to your ListView (which seems to be the case). You'll have to process all the concerned Listview Windows messages too. ---------------------------------------------------------------------- Mike.Cornflake · 2014-10-29 01:21 Thanks Chris.   I came to the same conclusions.   Long term I'll have to move from TListView, short term I've just disabled the functionality I was after.   It was cosmetic, not critical...