Recent

Author Topic: TListView (Mac, !azarus, 64 bit)  (Read 1095 times)

yazzdi

  • New Member
  • *
  • Posts: 16
TListView (Mac, !azarus, 64 bit)
« on: August 13, 2019, 10:34:44 pm »
I’m having an issue with TListView in 64 bit, Lazarus 2.0.4 FPC 3.0.4
This is on a Mac.
The issue didn’t occur in 32 bits.
I’m using a Virtual Listview so ownerdata is set to true and so I set the number of items wanted by setting ListView1.Items.Count :=N and then the Listview1Data routine gets called N times to fill up the data. That all works fine and as expected.

The problem occurs when, after the dialog is open, I need to change the number of items wanted in the TListView. For example, if I have 20, but want 200 rows, I set ListView1.Items.Count :=200 and then call Listview1.Refresh. The problem that happens is that I still only get 20 rows, not 200. The Listview1Data routine is only called 20 times,  not 200, and it is for rows 0-19.

What is the way I’m supposed to change the number of rows in the TListView? And should I call something other than Listview1.Refresh to see the new number of rows?
« Last Edit: August 13, 2019, 10:39:36 pm by yazzdi »

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: TListView (Mac, !azarus, 64 bit)
« Reply #1 on: August 13, 2019, 10:44:40 pm »

yazzdi

  • New Member
  • *
  • Posts: 16
Re: TListView (Mac, !azarus, 64 bit)
« Reply #2 on: August 13, 2019, 11:05:42 pm »
Many thanks, I will try that and let you know how it turns out.

yazzdi

  • New Member
  • *
  • Posts: 16
Re: TListView (Mac, !azarus, 64 bit)
« Reply #3 on: August 14, 2019, 10:54:42 pm »
I confirm that using the newest trunk Lazarus code, the ListView issue described above is fixed. Many thanks!

 

TinyPortal © 2005-2018