Listview ScrollViewPos

0

hello

how to get the max value of ScrollViewPos for listview?

  • Accepted Answer

    Wednesday, September 13 2017, 11:17 PM - #Permalink
    0

    thank you soo much .... i'm talking about FMX ListView ... not VCL ..... 

    i know ...i have to calculate it ... but how...

    so i found the answer...

    i scroll the listview to the last item and the save the scrollviewpos.... in public variable ... 

    The reply is currently minimized Show
  • Responses (1)
    • Accepted Answer

      Wednesday, September 13 2017, 12:21 PM - #Permalink
      0

      ScrollViewPos only gives you the current position of the scroll bars, so there is no "max value" for that - the maximum possible value will be based on the number of items you have in the list, and the format (ViewStyle) of the list view (icon, list, report, smallicons) and how many of the items can fit on the display surface.

      You may be able to calculate that information based on the windows messages you can send to the list view:

      List View Messages

      https://msdn.microsoft.com/en-us/library/windows/desktop/ff485961(v=vs.85).aspx

       

      LVM_APPROXIMATEVIEWRECT message

      https://msdn.microsoft.com/en-us/library/windows/desktop/bb774883(v=vs.85).aspx

       

      I believe you can use these by calling the Windows API SendMessage method with appropriate parameters.

      The reply is currently minimized Show
    Your Reply

    Please login to post a reply