当前位置: 首页>>代码示例>>C#>>正文


C# ListView.BringToFront方法代码示例

本文整理汇总了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();
		}
开发者ID:andrepontesmelo,项目名称:imjoias,代码行数:35,代码来源:TextBoxPessoa.cs

示例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();
        }
开发者ID:HoTnFunkY,项目名称:BasicProgramingExam,代码行数:50,代码来源:Form1.cs


注:本文中的System.Windows.Forms.ListView.BringToFront方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。