* * *

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

Milsa

  • Full Member
  • ***
  • Posts: 162
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.

Milsa

  • Full Member
  • ***
  • Posts: 162
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.

Milsa

  • Full Member
  • ***
  • Posts: 162
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.

Graeme

  • Hero Member
  • *****
  • Posts: 1410
    • 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/

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus