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


C# Forms.ColumnHeader类代码示例

本文整理汇总了C#中System.Windows.Forms.ColumnHeader的典型用法代码示例。如果您正苦于以下问题:C# ColumnHeader类的具体用法?C# ColumnHeader怎么用?C# ColumnHeader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ColumnHeader类属于System.Windows.Forms命名空间,在下文中一共展示了ColumnHeader类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateHeaders

 private void CreateHeaders()
 {
     ColumnHeader[] headers = new ColumnHeader[4];
     int index = 0;
     headers[index] = new ColumnHeader();
     headers[index].Name = "Filename";
     headers[index].Text = "Filename";
     headers[index].Width = 150;
     headers[index].TextAlign = HorizontalAlignment.Left;
     index++;
     headers[index] = new ColumnHeader();
     headers[index].Name = "Results";
     headers[index].Text = "Results";
     headers[index].TextAlign = HorizontalAlignment.Right;
     headers[index].Width = 200;
     index++;
     headers[index] = new ColumnHeader();
     headers[index].Name = "Size";
     headers[index].Text = "Size(KB)";
     headers[index].TextAlign = HorizontalAlignment.Right;
     headers[index].Width = 75;
     index++;
     headers[index] = new ColumnHeader();
     headers[index].Name = "LastModified";
     headers[index].Text = "Last Modified";
     headers[index].TextAlign = HorizontalAlignment.Right;
     headers[index].Width = 125;
     listView1.Columns.AddRange(headers);
 }
开发者ID:NALSS,项目名称:epiinfo-82474,代码行数:29,代码来源:ViewOutputFiles.cs

示例2: ResizeColumn

 internal static void ResizeColumn(ColumnHeader columnHeader) {
   columnHeader.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
   int headerSize = columnHeader.Width;
   columnHeader.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
   int contentSize = columnHeader.Width;
   columnHeader.Width = Math.Max(headerSize, contentSize);
 }
开发者ID:t-h-e,项目名称:HeuristicLab,代码行数:7,代码来源:Util.cs

示例3: InitializeComponent

		/// <summary> 
		/// Required method for Designer support - do not modify 
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent() {
			this.lvwFields = new System.Windows.Forms.ListView();
			this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
			this.SuspendLayout();
			// 
			// lvwFields
			// 
			this.lvwFields.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
				| System.Windows.Forms.AnchorStyles.Left) 
				| System.Windows.Forms.AnchorStyles.Right)));
			this.lvwFields.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
																						this.columnHeader1});
			this.lvwFields.FullRowSelect = true;
			this.lvwFields.HideSelection = false;
			this.lvwFields.Location = new System.Drawing.Point(0, 0);
			this.lvwFields.Name = "lvwFields";
			this.lvwFields.Size = new System.Drawing.Size(320, 200);
			this.lvwFields.TabIndex = 0;
			this.lvwFields.View = System.Windows.Forms.View.Details;
			// 
			// columnHeader1
			// 
			this.columnHeader1.Text = "Fields";
			this.columnHeader1.Width = 400;
			// 
			// ucPick_Fields
			// 
			this.Controls.Add(this.lvwFields);
			this.Name = "ucPick_Fields";
			this.Size = new System.Drawing.Size(320, 184);
			this.ResumeLayout(false);

		}
开发者ID:katshann,项目名称:ogen,代码行数:37,代码来源:ucPick_Fields.cs

示例4: InitializeComponent

        private void InitializeComponent()
        {
            this.Text = "Jump to buffer";

            ColumnHeader columnHeader = new ColumnHeader();
            columnHeader.Text = "Buffer";

            this.bufferlistview = new ListView();
            this.bufferlistview.View = View.Details;
            this.bufferlistview.HeaderStyle = ColumnHeaderStyle.Nonclickable;
            this.bufferlistview.FullRowSelect = true;
            this.bufferlistview.Dock = DockStyle.Fill;
            this.bufferlistview.Columns.Add(columnHeader);
            this.bufferlistview.SelectedIndexChanged += this.BufferListView_SelectedIndexChanged;
            this.Controls.Add(this.bufferlistview);

            MainMenu menu = new MainMenu();
            this.Menu = menu;

            MenuItem select = new MenuItem();
            select.Text = "Select buffer";
            select.Click += this.Select_Click;
            menu.MenuItems.Add(select);

            MenuItem cancel = new MenuItem();
            cancel.Text = "Cancel";
            cancel.Click += this.Cancel_Click;
            menu.MenuItems.Add(cancel);
        }
开发者ID:txanatan,项目名称:KitChat,代码行数:29,代码来源:JumpToBufferDialog.cs

示例5: AddLanguageToView

        private void AddLanguageToView(string addon_resource, string language, ListView list)
        {
            try
            {
                if (languages.ContainsKey(language))
                {
                    languages[language] = LoadPO(language, addon_resource);
                }
                else
                {
                    ColumnHeader[] ch = new ColumnHeader[] { new ColumnHeader() };

                    LanguageInfo lng = LoadPO(language, addon_resource);

                    languages.Add(language, lng);

                    ch[0].Text = string.Format("Translation({0})", lng.RevisionInfo["Language"].Replace(@"\n", ""));
                    ch[0].Width = list.Columns[2].Width;
                    list.Columns.AddRange(ch);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
开发者ID:kib,项目名称:translations,代码行数:26,代码来源:frmMain.cs

示例6: InitializeComponent

 /// <summary> 
 /// Required method for Designer support - do not modify 
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.listSummary = new System.Windows.Forms.ListView();
     this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
     this.SuspendLayout();
     //
     // listSummary
     //
     this.listSummary.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
                                                                                   this.columnHeader1});
     this.listSummary.Dock = System.Windows.Forms.DockStyle.Fill;
     this.listSummary.Location = new System.Drawing.Point(0, 0);
     this.listSummary.Name = "listSummary";
     this.listSummary.Size = new System.Drawing.Size(392, 272);
     this.listSummary.TabIndex = 0;
     this.listSummary.View = System.Windows.Forms.View.Details;
     //
     // columnHeader1
     //
     this.columnHeader1.Text = "Account Info";
     this.columnHeader1.Width = 167;
     //
     // SingleAccountSummary
     //
     this.Controls.Add(this.listSummary);
     this.Name = "SingleAccountSummary";
     this.Size = new System.Drawing.Size(392, 272);
     this.ResumeLayout(false);
 }
开发者ID:beaujackson,项目名称:Checkbook,代码行数:33,代码来源:SingleAccountSummary.cs

示例7: InitializeComponent

		/// <summary>
		/// Required method for Designer support - do not modify 
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.columnHeader_id = new System.Windows.Forms.ColumnHeader();
			this.columnHeader_first = new System.Windows.Forms.ColumnHeader();
			// 
			// columnHeader_id
			// 
			this.columnHeader_id.Text = "记录路径";
			this.columnHeader_id.Width = 150;
			// 
			// columnHeader_first
			// 
			this.columnHeader_first.Text = "1";
			this.columnHeader_first.Width = 200;
			// 
			// BrowseList
			// 
			this.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
																			  this.columnHeader_id,
																			  this.columnHeader_first});
			this.FullRowSelect = true;
			this.HideSelection = false;
			this.View = System.Windows.Forms.View.Details;

		}
开发者ID:paopaofeng,项目名称:dp2,代码行数:29,代码来源:BrowseList.cs

示例8: fillListViewDetails

		private void fillListViewDetails(ListView lv)
		{
			ColumnHeader header = null;
			ListViewItem item = null;

			header = new ColumnHeader();
			header.Text = "un";
			lv.Columns.Add(header);

			header = new ColumnHeader();
			header.Text = "deux";
			lv.Columns.Add(header);

			header = new ColumnHeader();
			header.Text = "trois";
			lv.Columns.Add(header);

			item = new ListViewItem("foo");
			item.SubItems.Add("bar");
			item.SubItems.Add("baz");
			lv.Items.Add(item);

			item = new ListViewItem("CA");
			item.SubItems.Add("MD");
			item.SubItems.Add("WI");
			lv.Items.Add(item);

			item = new ListViewItem("Sushi");
			item.SubItems.Add("Indian");
			item.SubItems.Add("Tex-Mex");
			lv.Items.Add(item);
		}
开发者ID:hitswa,项目名称:winforms,代码行数:32,代码来源:swf-listview.cs

示例9: InitializeListView

        public static void InitializeListView(ListView listview)
        {
            // ListViewコントロールのプロパティを設定
            listview.FullRowSelect = true;
            listview.GridLines = true;
            listview.Sorting = SortOrder.Ascending;
            listview.View = View.Details;

            // 列(コラム)ヘッダの作成
            ColumnHeader goods_barcode = new ColumnHeader();
            ColumnHeader goods_id = new ColumnHeader();
            ColumnHeader goods_order = new ColumnHeader();
            ColumnHeader goods_price = new ColumnHeader();

            goods_barcode.Text = "バーコード";
            goods_barcode.Tag = 3;
            goods_barcode.TextAlign = HorizontalAlignment.Center;

            goods_id.Text = "日時";
            goods_id.Tag = 6;
            goods_id.TextAlign = HorizontalAlignment.Center;

            goods_order.Text = "金額";
            goods_order.Tag = 2;
            goods_order.TextAlign = HorizontalAlignment.Center;

            goods_price.Text = "点数";
            goods_price.Tag = 2;
            goods_price.TextAlign = HorizontalAlignment.Right;

            ColumnHeader[] colHeaderRegValue = {goods_barcode, goods_id, goods_order,  goods_price };
            listview.Columns.AddRange(colHeaderRegValue);
        }
开发者ID:KidsPOSProject,项目名称:KidsPOS-for-Windows,代码行数:33,代码来源:Sales_List.cs

示例10: Form1

        public Form1()
        {
            InitializeComponent();

            hostIP = getHostIPAddress();
            //每隔一段时间检查是否流量超出
            MainTimer2.Interval = 1000*60*5;
            MainTimer2.Elapsed += Over_Traffic_Flow;
            // 每秒处理数据
            MainTimer.Interval = 1000;
            MainTimer.Tick += update;
            //处理listview的表头
            ColumnHeader h1 = new ColumnHeader();
            h1.Text = "Protocol";
            //h1.Width = 150;
            ColumnHeader h2 = new ColumnHeader();
            h2.Text = "Source IP";
            h2.Width = 120;
            ColumnHeader h3 = new ColumnHeader();
            h3.Text = "Destination IP";
            h3.Width = 120;
            ColumnHeader h4 = new ColumnHeader();
            h4.Text = "Length(Byte)";
            h4.Width = 100;
            listView1.Columns.AddRange(new ColumnHeader[]{h1,h2,h3,h4});
            listView1.View = View.Details;
        }
开发者ID:JasonWyse,项目名称:dataflow_monitor,代码行数:27,代码来源:Form1.cs

示例11: InitializeComponent

		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BinaryResults));
            this.listView1 = new System.Windows.Forms.ListView();
            this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
            this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
            this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
            this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
            this.SuspendLayout();
            // 
            // listView1
            // 
            this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
            this.columnHeader1,
            this.columnHeader2,
            this.columnHeader3,
            this.columnHeader4});
            this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.listView1.FullRowSelect = true;
            this.listView1.GridLines = true;
            this.listView1.Location = new System.Drawing.Point(0, 0);
            this.listView1.MultiSelect = false;
            this.listView1.Name = "listView1";
            this.listView1.Size = new System.Drawing.Size(368, 308);
            this.listView1.TabIndex = 0;
            this.listView1.UseCompatibleStateImageBehavior = false;
            this.listView1.View = System.Windows.Forms.View.Details;
            this.listView1.Resize += new System.EventHandler(this.listView1_Resize);
            // 
            // columnHeader1
            // 
            this.columnHeader1.Text = "Result";
            // 
            // columnHeader2
            // 
            this.columnHeader2.Text = "Dest Index";
            this.columnHeader2.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            // 
            // columnHeader3
            // 
            this.columnHeader3.Text = "Source Index";
            this.columnHeader3.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            // 
            // columnHeader4
            // 
            this.columnHeader4.Text = "Length";
            this.columnHeader4.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            // 
            // BinaryResults
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.ClientSize = new System.Drawing.Size(368, 308);
            this.Controls.Add(this.listView1);
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.Name = "BinaryResults";
            this.Text = "Website Scraper Binary Results";
            this.Load += new System.EventHandler(this.BinaryResults_Load);
            this.ResumeLayout(false);

		}
开发者ID:vearvindkumar,项目名称:Scrapper,代码行数:64,代码来源:BinaryResults.cs

示例12: DataSearchListView

        public DataSearchListView()
        {
            var colTableName = new ColumnHeader
            {
                Name = "TableName",
                Text = "Table Name",
                Width = 400
            };

            var colSearchStatus = new ColumnHeader
            {
                Name = "Status",
                Text = "Records",
                Width = 400,
            };
          

           Columns.AddRange(new[]
            {
                colTableName,
                colSearchStatus,
             
            });
            
        }
开发者ID:ninerats,项目名称:DataTools,代码行数:25,代码来源:DataSearchListView.cs

示例13: GridViewControl

        public GridViewControl()
        {
            InitializeComponent();

            // this is the default, set it so we know for certain
            gridView.View = View.LargeIcon;

            // add the columns to the gridView
            var fileNameColumn = new ColumnHeader("File")
            {
                Text = "File",
                Width = 200
            };
            var extensionColumn = new ColumnHeader("Extension")
            {
                Text = "ext",
                Width = 50
            };
            var lengthColumn = new ColumnHeader("FrameRate")
            {
                Text = "Framerate",
                Width = 60
            };
            gridView.Columns.Add(fileNameColumn);
            gridView.Columns.Add(extensionColumn);
            gridView.Columns.Add(lengthColumn);

            // disable the icon view since we are already there
            iconViewButton.Enabled = false;
        }
开发者ID:Kaan0200,项目名称:Zoodevio_VideoLibrary,代码行数:30,代码来源:GridViewControl.cs

示例14: ResourceBrowser

        public ResourceBrowser()
        {
            this.AllowDrop = true;
            this.View = View.Details;
            this.MultiSelect = true;
            this.AllowColumnReorder = true;
            this.FullRowSelect = true;
            this.HeaderStyle = ColumnHeaderStyle.Clickable;
            this.LabelEdit = true;
            this.HideSelection = false;
            this.TabIndex = 1;

            ColumnHeader nameHeader = new ColumnHeader();
            nameHeader.Text = "Name";
            nameHeader.Width = 240;
            this.Columns.Add(nameHeader);

            ColumnHeader valueHeader = new ColumnHeader();
            valueHeader.Text = "Value";
            valueHeader.Width = 300;
            this.Columns.Add(valueHeader);

            ColumnHeader typeHeader = new ColumnHeader();
            typeHeader.Text = "Type";
            typeHeader.Width = 500;
            this.Columns.Add(typeHeader);

            this.SmallImageList = new ImageList();
            this.SmallImageList.Images.AddStrip(new Bitmap(this.GetType().Assembly.GetManifestResourceStream("Resourcer.Browser.png")));
            this.SmallImageList.ColorDepth = ColorDepth.Depth32Bit;
            this.SmallImageList.TransparentColor = Color.FromArgb(255, 0, 128, 0);
        }
开发者ID:modulexcite,项目名称:Resourcer,代码行数:32,代码来源:ResourceBrowser.cs

示例15: FeedListView

        public FeedListView(IContainer container)
        {
            container.Add(this);

            InitializeComponent();

            this.SuspendLayout();

            this.DoubleBuffered = true;
            this.OwnerDraw = true;
            this.DrawItem += new DrawListViewItemEventHandler(FeedListView_DrawItem);

            // columns
            ColumnHeader nameHeader = new ColumnHeader();
            ColumnHeader urlHeader = new ColumnHeader();
            this.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
                nameHeader,
                urlHeader});

            this.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
            //this.LargeImageList = this.imageList;
            this.MultiSelect = false;
            this.UseCompatibleStateImageBehavior = false;
            this.View = System.Windows.Forms.View.Tile;
            this.Scrollable = false;
            this.ShowItemToolTips = true;
            this.LabelWrap = false;

            // uncomment this to use custom tool tips
            //this.ShowItemToolTips = false;
            this.ItemMouseHover += new ListViewItemMouseHoverEventHandler(FeedListView_ItemMouseHover);
            //this.MouseLeave += new EventHandler(FeedListView_MouseLeave);

            this.ResumeLayout();
        }
开发者ID:iwaim,项目名称:growl-for-windows,代码行数:35,代码来源:FeedListView.cs


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