Search Tools Links Login

API ListView Autosize Width of Column Headers (based on widest row)

Visual Basic 6, or VB Classic

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.

Original Author: Barcode (Andy D.)

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 93 times


Visual Basic 6

Posted: 9/3/2020 3:45:00 PM
Size: 9,198 bytes

Loading Comments ...


No comments have been added for this post.

You must be logged in to make a comment.