Recent

Author Topic: [Solved] TlistView problems on MacOs  (Read 958 times)

Wilko500

  • Full Member
  • ***
  • Posts: 180
[Solved] TlistView problems on MacOs
« on: May 29, 2025, 12:06:39 am »
MacOs Sequoia, Laz4RC2, FPC 3.2.3

I am experimenting on various ideas to mimic the GUI of my windows solar inverter program (provided by inverter manufacturer) in my FPC version.  I require to display a simple list of values in table format.  My thought was to use a ListView and indeed it will display the values but there are formatting problems.

I am unable to right align the column contents
I am unable to change the default colour of either the column headers or the column data
I am unable to change the ListView font size

There are properties for all of these in the properties window of the components panel but they do not seem to work

I suspect that some of these issue are Mac related in the Cocoa widget set so perhaps no solution :(

I added the ListView at design time using the IDE.  If these issues are not resolvable in Cocoa is there an alternative to using a ListView
« Last Edit: May 29, 2025, 06:47:19 pm by Wilko500 »
MacBook Pro mid 2015 with OS Monterey 12.7.6
FPC 3.2.3 Lazarus 3.7
FPC 3.2.2 Lazarus 3.4

wp

  • Hero Member
  • *****
  • Posts: 13336
Re: TlistView problems on MacOs
« Reply #1 on: May 29, 2025, 12:11:54 am »
For a tabular display of data, TStringGrid is much more flexible than TListView (http://wiki.lazarus.freepascal.org/Grids_Reference_Page, https://wiki.lazarus.freepascal.org/TStringGrid)

Wilko500

  • Full Member
  • ***
  • Posts: 180
Re: TlistView problems on MacOs
« Reply #2 on: May 29, 2025, 06:46:45 pm »
Thank you.  TStringGrid worked very nicely. Will be able to use it in another of me programs.
MacBook Pro mid 2015 with OS Monterey 12.7.6
FPC 3.2.3 Lazarus 3.7
FPC 3.2.2 Lazarus 3.4

 

TinyPortal © 2005-2018