本文整理汇总了C#中System.Windows.Forms.ListView.BringToFront方法的典型用法代码示例。如果您正苦于以下问题:C# ListView.BringToFront方法的具体用法?C# ListView.BringToFront怎么用?C# ListView.BringToFront使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.ListView
的用法示例。
在下文中一共展示了ListView.BringToFront方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CriarLista
/// <summary>
/// Cria lista
/// </summary>
private void CriarLista()
{
// Constrói a listview
lista = new ListView();
// Atributos visuais
int alturaProposta = 3 * this.Height;
lista.Height = alturaProposta < alturaMínimaLista ? alturaMínimaLista : alturaProposta;
lista.Visible = false;
lista.Name = this.Name + "Lista";
lista.FullRowSelect = true;
lista.MultiSelect = false;
lista.HideSelection = false;
lista.View = View.Details;
lista.BorderStyle = BorderStyle.FixedSingle;
lista.HeaderStyle = mostrarCabeçalho ? ColumnHeaderStyle.Nonclickable : ColumnHeaderStyle.None;
// Eventos
lista.SelectedIndexChanged += new EventHandler(lista_SelectedIndexChanged);
lista.Click += new EventHandler(lista_Click);
lista.MouseMove += new MouseEventHandler(lista_MouseMove);
lista.MouseLeave += new EventHandler(lista_MouseLeave);
// Colunas
lista.Columns.Add(colNome);
lista.Columns.Add(colDados);
this.TopLevelControl.SuspendLayout();
this.TopLevelControl.Controls.Add(lista);
lista.BringToFront();
}
示例2: scoreboardList
private void scoreboardList()
{
ListView scoreboard = new ListView();
scoreboard.Bounds = new Rectangle(new Point(400, 100), new Size(84 + (60 * numberOfPlayers), 400));
scoreboard.View = View.Details;
scoreboard.GridLines = true;
scoreboard.FullRowSelect = true;
string[] info = new string[18];
string[] row = new string[numberOfPlayers + 1];
info[0] = "1'ere";
info[1] = "2'ere";
info[2] = "3'ere";
info[3] = "4'ere";
info[4] = "5'ere";
info[5] = "6'ere";
info[6] = "sum";
info[7] = "bonus";
info[8] = "Et par";
info[9] = "To par";
info[10] = "Tre ens";
info[11] = "Fire ens";
info[12] = "Lav";
info[13] = "Høj";
info[14] = "Fuldt hus";
info[15] = "Chance";
info[16] = "Yatzy";
info[17] = "I alt";
scoreboard.Columns.Add("Spillere", 80, HorizontalAlignment.Left);
for (int i = 1; i <= numberOfPlayers; i++)
{
scoreboard.Columns.Add(playerNames[i], 60, HorizontalAlignment.Left);
}
ListViewItem itm;
for (int i = 0; i <= 17; i++)
{
row[0] = info[i];
for (int k = 1; k <= numberOfPlayers; k++)
{
row[k] = "-";
}
itm = new ListViewItem(row);
scoreboard.Items.Add(itm);
}
scoreboard.Items[1].SubItems[1].Text = "Hej";
scoreboard.Font = textFont;
this.Controls.Add(scoreboard);
scoreboard.BringToFront();
}