Recent

Author Topic: Hide Column in TListView  (Read 1712 times)

esdonis

  • Jr. Member
  • **
  • Posts: 61
Hide Column in TListView
« on: January 20, 2022, 05:24:15 pm »
how to hide a column in a TListView?

balazsszekely

  • Guest
Re: Hide Column in TListView
« Reply #1 on: January 20, 2022, 05:56:02 pm »
how to hide a column in a TListView?

IIRC you can't. Set width to zero or even better delete the column when is not needed. Alternatively you can switch to VST, where hiding a column is a trivial operation.

kapibara

  • Hero Member
  • *****
  • Posts: 610
Re: Hide Column in TListView
« Reply #2 on: January 20, 2022, 07:14:43 pm »
I noticed, at least in the trunk version, that ListView columns now has the boolean property Visible.
Tested with ListView set to ViewStyle vsreport and that works.
Lazarus trunk / fpc 3.2.2 / Kubuntu 22.04 - 64 bit

balazsszekely

  • Guest
Re: Hide Column in TListView
« Reply #3 on: January 20, 2022, 07:41:10 pm »
I noticed, at least in the trunk version, that ListView columns now has the boolean property Visible.
Tested with ListView set to ViewStyle vsreport and that works.
Sets the column width to 0, you can increase the size of the column with the mouse. Just a pseudo solution.

 

TinyPortal © 2005-2018