Recent

Author Topic: ListView - autosize by column without horizontal scrollbar  (Read 2637 times)

Milsa

  • Sr. Member
  • ****
  • Posts: 309
ListView - autosize by column without horizontal scrollbar
« on: October 12, 2017, 08:12:01 pm »
I have 1 column in ListView.

How can I autosize:
1. column to max. text width in ListItem
2. and autosize ListView by Column[0] or max. width (constant)
3. and disable horizontal scrollbar
4. and autosize Form by ListView?

If I change ListView.Width by ListView.Column[0].Width + 30 (accuracy horizontal scrollbar width) LCL changes ListView.Column[0].Width to ListView.Width and adds scrollbar.
I work with Lazarus 2.2.2, FPC 3.2.2, date 2022-05-15
This information is actual to: 28st Dec 2022

Milsa

  • Sr. Member
  • ****
  • Posts: 309
Re: ListView - autosize by column without horizontal scrollbar
« Reply #1 on: October 12, 2017, 09:08:49 pm »
Update:

Problem is in useless horizontal scrollbar, which shows but it is useless. I am creating example for upload but ListView in my example works correct. I don't know what is difference between my application and this example.
I work with Lazarus 2.2.2, FPC 3.2.2, date 2022-05-15
This information is actual to: 28st Dec 2022

Milsa

  • Sr. Member
  • ****
  • Posts: 309
Re: ListView - autosize by column without horizontal scrollbar
« Reply #2 on: October 12, 2017, 09:34:04 pm »
I removed ListView and inserted clear ListView it to form. I set ListBox and application is without problem. I don't understand it.
I work with Lazarus 2.2.2, FPC 3.2.2, date 2022-05-15
This information is actual to: 28st Dec 2022

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: ListView - autosize by column without horizontal scrollbar
« Reply #3 on: October 13, 2017, 12:44:25 am »
 :D  Welcome to programming!   ;)
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

 

TinyPortal © 2005-2018