See:
http://www.lebans.com/listboxcolumnresize.htm
ListBoxColumnResize.zip is a Class that allows the user to resize the
ColumnWidths of a ListBox at Runtime.Also supports an Autosizing method for
the ColumnWidths.
Version 2.2 April 27/2002
Modified Columns AutoSizing method to work with both ListBox and Combo
controls.
Version 2.1 April 10/2002
BUG FIX! I thought I had cleaned this bug from all of my code but I missed
one instance. In Win9x this code will work 100% of the time:
If lngIC 0 Then But in WinNT or higher the GDI object handles are full
32 bit values so they can be represented by the VB as negative values. The
solution is to change the code to: If lngIC <0 Then
Version 2.0 April 9/2002
Added support for AUTOSIZING of ColumnWidths.
--
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
<de**********@gmail.comwrote in message
news:11**********************@45g2000cws.googlegro ups.com...
Hi everyone,
I have a database table with first name and last name entries. I am
using a ListBox to show these values.
Now what I want is that the columns adjust their width automatically
based on the length of the longest name. Is there some way I can do
this rather than set the width manually. Maybe there is a better
control to show these values and allow the user to select multiple
values at a time?
Any ideas or suggestions?
Cheers,
Pankaj