IJamShellColumnCollection Interface |
Namespace: Jam.Shell
The IJamShellColumnCollection type exposes the following members.
Name | Description | |
---|---|---|
ItemInt32 |
Gets the JamShellColumnHeader at the specified index.
| |
ItemSHCOLUMNID |
Gets the JamShellColumnHeader identified by the passed SHCOLUMNID |
Name | Description | |
---|---|---|
Add(ColumnHeader) | Obsolete.
Adds the specified ColumnHeader to the collection. Please use Add(JamShellColumnHeader) instead.
| |
Add(JamShellColumnHeader) |
Adds the specified JamShellColumnHeader to the collection.
| |
Add(SHCOLUMNID) |
Adds the shell column identified by the passed SHCOLUMNID.
| |
Clear |
Clears this instance.
| |
GetColumnByShellIndex |
Gets the JamShellColumnHeader identified by the passed shell index.
| |
Insert |
Inserts the shell column identified by the passed SHCOLUMNID at the passed position.
| |
Remove(JamShellColumnHeader) |
Removes the specified ColumnHeader from the collection.
| |
Remove(SHCOLUMNID) |
Removes the shell column identified by the passed SHCOLUMNID.
| |
Show |
Shows the shell column identified by the passed SHCOLUMNID at its default shell position.
|
private void ShellListView1_CreatedColumns(object sender, EventArgs e) { if (shellListView1.SpecialFolder == ShellFolder.MyMusic) { shellListView1.BeginUpdate(); shellListView1.Columns.Clear(); //name column it will be reinserted again automatically. shellListView1.Columns.Show(SHCOLUMNID.ShellColumnSummaryTitle); //displays the column at the default position. shellListView1.Columns.Show(SHCOLUMNID.ShellColumnMusicAlbum); shellListView1.Columns.Show(SHCOLUMNID.ShellColumnMusicArtist); shellListView1.Columns.Add(SHCOLUMNID.ShellColumnMusicGenre); //adds the column at the end. shellListView1.EndUpdate(); } }
private void ShellListView_CreatedColumns(object sender, EventArgs e) { // add a column for the path length JamShellColumnHeader lCol = new JamShellColumnHeader(); lCol.Text = cPathLengthString; lCol.TextAlign = HorizontalAlignment.Right; lCol.Width = 85; shellListView1.Columns.Add(lCol); lCol.DisplayIndex = 1; //if you want a different position for your column use the DisplayIndex. // add a column for the link target lCol = new JamShellColumnHeader(); lCol.Text = cLinkTargetString; // the link target is a full path so we need a large column lCol.Width = 350; shellListView1.Columns.Add(lCol); } private void ShellListView_AddItem(object sender, Jam.Shell.AddItemEventArgs e) { //The AddItem is called for every item that is added to the list. You need to provide values for the custom columns. //Add the subitems in the same order the columns were added (the index of column and subItems must match). // get the path length string lLength = e.Item.FullPath.Length.ToString(System.Globalization.CultureInfo.CurrentCulture); // add the path length as subitem e.Item.SubItems.Add(lLength); // check whether the item is a link // note: the next few lines are just used for illustrative purposes. // the retrieval of the link target may take some time for large file lists string lLinkTarget = ShellBrowser.GetLinkTarget(e.Item.FullPath); // add the link target as subitem (if it`s not a link, an empty string was returned) e.Item.SubItems.Add(lLinkTarget); }