by Barcode (Andy D.) (1 Submission)
Category: Windows API Call/Explanation
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (15 Votes)
API call to autosize the columns in a ListView control. I made this example because I could only find mediocre examples that worked by getting the Len() of every row, multiplying it by something, and comparing it to the column width. This uses only one command to do the actual resizing and is definately faster.
Update (12/07/2000 20:52 CST): Corrected typo, better screenshot.
Update (04/27/2002 15:00 CST): Moved code into one form, Added LVSCW_AUTOSIZE_USEHEADER, Added COMMCTL32.DLL known bug with fix, Added individual bold item known bug with fix.
Update (12/31/2004 22:00 CST): Updated website, Released under GPL, PNG screenshot.
Upload
No comments have been posted about API ListView Autosize Width of Column Headers (based on widest row). Why not be the first to post a comment about API ListView Autosize Width of Column Headers (based on widest row).