Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Organizing Text in listView

Status
Not open for further replies.

choudhmh

Programmer
Aug 9, 2004
34
GB
I have this listView inside there through a click of a button openBrowser command takes place where it displays all the files from that browser into the listView panel.
Now i need to organize the file inside the listView as the folder containes lots of files, they are spread all over the listview. I've inserted some labels on top of the list view naming them File name and size. Underneath the file name i want all the files to vertically line up, while underneath the size i want to retrive the infromation of each file size and make them vertically line up.

Here's how the files are retrive and listed on the listView:

f (listView1.FocusedItem == null) return;

if (listView1.FocusedItem.Tag == null)
{
MessageBox.Show("Error: You have NOT assigned the file's path to the listview items Tag property when opening the file!", ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}try
{
System.Diagnostics.Process.Start( (string)listView1.FocusedItem.Tag);
}
catch (Exception ex)
{
MessageBox.Show("Error: " + ex.Message, ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}

What code will i insert inorder to accompolish my mission.

Thanks,
Mac
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top