newbie question... Detail view?

grifter102
03-24-2003, 02:00 PM
Okay, I'm completely new to Visual Basic and need to make a program to view/modify a telephone book. What I wanted was a detailed view, sort of like View... Details... in explorer. Name in the first column, number(s) in the next column. Is there a control that does this? Does it allow for sorting?

thanks.

Machaira
03-24-2003, 02:13 PM
That would be the ListView control. You'll have to program the sorting however. There's probably 3rd party controls that offer this functionality.

grifter102
03-24-2003, 02:19 PM
That would be the ListView control. You'll have to program the sorting however. There's probably 3rd party controls that offer this functionality.

thanks... but where do I find the ListView control? It's not in the toolbar and when I right-click, and go to components... I can't seem to find it listed.

PWNettle
03-24-2003, 02:24 PM
That would be the ListView control. You'll have to program the sorting however. There's probably 3rd party controls that offer this functionality.

thanks... but where do I find the ListView control? It's not in the toolbar and when I right-click, and go to components... I can't seem to find it listed.

Select 'Microsoft Windows Common Controls 6.0' from Components (ListView is in that set). Also, to use the ListView for tabular data and setup your columns and such you'll want to right-click on a control after you've placed it on your form and change the view 'report' style.

Populating a ListView is a little odd until you get used to it...you might check out examples in MSDN or search here to get started. :)

You can have a ListView sort itself...check out the SortKey and Sorted properties. In fact, depending on how many columns you have and your sorting desires, it's possible to write some short and slick code to allow the user to sort/reverse sort by clicking the column heads....but I ramble.

Paul

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum