Resize listbox based on amount of data written

Hello all,

It appears I am not getting it ....

I have anchored a listbox to a form (top and left) and want the listbox to expand (or contract) based on the number of columns that I write  to the listbox in question.  

Is this a simple task (please no links, my head is swimming after trying to disect some of the sample code)?

Thanks much,
Who is Participating?
basetewConnect With a Mentor Commented:
ListBox is far too cut-down/feeble for your needs.

Use ListView control instead. "If you want precise control over columns and what entries get placed in what columns, you should investigate the ListView control. The ListBox simply wraps the data to the next column once the data hits the bottom of the control." -some Microsoft guy.

For even more pro approach, use DataGrid. But try ListView first.

DMVAuthor Commented:
Thanks, I'll give it a try.

All Courses

From novice to tech pro — start learning today.