Lazarus

Programming => LCL => Topic started by: Milsa on October 12, 2017, 08:12:01 pm

Title: ListView - autosize by column without horizontal scrollbar
Post by: Milsa 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.
Title: Re: ListView - autosize by column without horizontal scrollbar
Post by: Milsa 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.
Title: Re: ListView - autosize by column without horizontal scrollbar
Post by: Milsa 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.
Title: Re: ListView - autosize by column without horizontal scrollbar
Post by: Graeme on October 13, 2017, 12:44:25 am
 :D  Welcome to programming!   ;)
TinyPortal © 2005-2018