Recent

Author Topic: [Listview] How to set autosize for header and not text width  (Read 5715 times)

krexon

  • Jr. Member
  • **
  • Posts: 80
[Listview] How to set autosize for header and not text width
« on: August 06, 2010, 11:40:06 am »
I have listview component. I have autosize of columns set to true.
In delphi I check what is wider - item or header of column and set width to -1 or -2, but in Lazarus in both cases (width equal -1 or -2) width is set to item maxwidth. How to set width to header's with in Lazarus.

bd4kc

  • New Member
  • *
  • Posts: 46
Re: [Listview] How to set autosize for header and not text width
« Reply #1 on: December 01, 2020, 03:03:20 pm »
It's the same problem I've had

ASerge

  • Hero Member
  • *****
  • Posts: 2241
Re: [Listview] How to set autosize for header and not text width
« Reply #2 on: December 02, 2020, 01:46:34 am »
It's the same problem I've had
Yes, the current implementation always considers data width, not the header width.
It is possible to implement as you want. Make a request to bugtracker.
As a workaround, remove autosize.

bd4kc

  • New Member
  • *
  • Posts: 46
Re: [Listview] How to set autosize for header and not text width
« Reply #3 on: December 05, 2020, 05:48:43 pm »
Thank you very much, the header width problem is significant at high resolution, when the data is empty, the title will be reduced。

 

TinyPortal © 2005-2018