本文整理汇总了C#中System.Windows.Forms.ListView.Show方法的典型用法代码示例。如果您正苦于以下问题:C# ListView.Show方法的具体用法?C# ListView.Show怎么用?C# ListView.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.ListView
的用法示例。
在下文中一共展示了ListView.Show方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AutoResize
/// <summary>
/// resize all columns to best fit the header and the contents
/// </summary>
/// <param name="lv">The lv.</param>
public static void AutoResize(ListView lv)
{
lv.Hide();
foreach (ColumnHeader CH in lv.Columns)
{
AutoResizeListViewColumn(lv, CH);
}
lv.Show();
}
示例2: showFiles
void showFiles(FilesResult files, ListView listToShow)
{
listToShow.BeginInvoke(new Action(() =>
{
//clear contents
listToShow.Clear();
// Create columns for the items and subitems.
listToShow.Columns.Add("Filename", 400, HorizontalAlignment.Left);
foreach (var file in files.FilesEntry)
{
ListViewItem item = new ListViewItem(file.Label, 0);
item.Tag = file;
listToShow.Items.Add(item);
}
listToShow.Show();
}));
StopProgress();
}
示例3: CCProjectsView
public CCProjectsView(CCProjectsViewMgr viewMgr, string viewName)
{
if (viewName == string.Empty)
{
viewName = "NewView" + viewMgr.TabControl.TabCount;
}
bUserView = true;
bReadOnly = false;
Text = viewName;
m_viewMgr = viewMgr;
m_tabPage = CreateTabPage(viewMgr, viewName);
m_listView = CreateListView(viewMgr, m_tabPage);
m_tabPage.Show();
m_listView.Show();
}
示例4: SwapIndicies
/// <summary>
/// swap two rows given by their index
/// </summary>
/// <param name="lv">The lv.</param>
/// <param name="index1">First Index to Swap</param>
/// <param name="index2">Second Index to Swap</param>
public static void SwapIndicies(ListView lv, int index1, int index2)
{
lv.Hide();
if (index1 < 0 || index2 < 0 || index1 >= lv.Items.Count || index2 >= lv.Items.Count)
return;
//make clones
var LVI1 = (ListViewItem) lv.Items[index1].Clone();
var LVI2 = (ListViewItem) lv.Items[index2].Clone();
//swap the sub items
lv.Items[index1].SubItems.Clear();
lv.Items[index1].SubItems.AddRange(SubItemCollectionToRange(LVI2.SubItems));
lv.Items[index2].SubItems.Clear();
lv.Items[index2].SubItems.AddRange(SubItemCollectionToRange(LVI1.SubItems));
//swap the name and text
lv.Items[index1].Text = LVI1.Text;
lv.Items[index2].Text = LVI2.Text;
lv.Items[index1].Name = LVI1.Text;
lv.Items[index2].Name = LVI2.Text;
lv.Show();
}