delphifiremonkeytouchscreentlistviewtscrollbox

Firemonkey ListView scrollbar visibility


In the Firemonkey's TListview the visibility of the scroll bar depends whether the system has a touch screen. How can I override this behavior and show vertical scrolling always when there is not enough room on the list view to display all list items?

I saw within TListViewBase.Create that the scroll visibility depends again on the function result of HasTouchTracking and this depends if TScrollingBehaviour.TouchTracking is set in SystemInformationService.GetScrollingBehaviour.

Does anyone have a glue how I can override this behavior?


Solution

  • For Dave's proposed workaround, the touch tracking needs to be turned off as follows:

    function TPlatformListViewWorkaround.GetScrollingBehaviour: TScrollingBehaviours;
    begin
      result := fSysInfoService.GetScrollingBehaviour - [TScrollingBehaviour.TouchTracking];
    end;
    

    With this solution, however, you have to accept that the listview on touchscreen systems can no longer be scrolled with the finger.

    That's why I have now opened a change request in the Embarcadero Quality Central and suggested a solution proposal by extending the TListView with a new property SuppressScrollBarOnTouchSystems (RSP-26584).