本文整理汇总了C#中System.Windows.Forms.ColumnHeader类的典型用法代码示例。如果您正苦于以下问题:C# ColumnHeader类的具体用法?C# ColumnHeader怎么用?C# ColumnHeader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ColumnHeader类属于System.Windows.Forms命名空间,在下文中一共展示了ColumnHeader类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: AddHeaderToList
// add a header to a list
void AddHeaderToList(ListView list, string headerCaption, int headerWidth)
{
ColumnHeader header = new ColumnHeader();
header.Text = headerCaption;
header.Width = headerWidth;
list.Columns.Add(header);
}
开发者ID:tian1ll1,项目名称:WPF_Examples,代码行数:8,代码来源:ShowProposals.cs
示例17: createListView
private Dictionary<string, ListView> createListView()
{
Dictionary<string, ListView> dlv = new Dictionary<string, ListView>();
foreach (Dictionary<string, string> list in scoreList)
{
string name = list[HeaderList[0]] + " " + list[HeaderList[1]];
if (!dlv.Keys.Contains(name))
{
ListView lv = new ListView();
lv.View = View.Details;
lv.FullRowSelect = true;
lv.GridLines = true;
foreach (string str in HeaderList.Values)
{
ColumnHeader header1 = new ColumnHeader();
header1.Width = -2;
header1.Text = str;
header1.TextAlign = HorizontalAlignment.Left;
lv.Columns.Add(header1);
}
lv.Dock = DockStyle.Fill;
dlv.Add(name, lv);
}
dlv[name].Items.Add(new ListViewItem(list.Values.ToArray()));
}
return dlv;
}
开发者ID:surperone,项目名称:JiaowuHelper,代码行数:27,代码来源:Score.cs
示例18: Main
public Main()
{
InitializeComponent();
this.tvRegistry.BeforeExpand += tvRegistry_BeforeExpand;
this.tvRegistry.AfterSelect += tvRegistry_AfterSelect;
ColumnHeader ch = new ColumnHeader();
ch.Text = "Имя";
this.lvRegistry.Columns.Add(ch);
ch = new ColumnHeader();
ch.Text = "Тип";
this.lvRegistry.Columns.Add(ch);
ch = new ColumnHeader();
ch.Text = "Значение";
this.lvRegistry.Columns.Add(ch);
for (int i = 0; i < this.lvRegistry.Columns.Count; i++)
{
lvRegistry.Columns[i].AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
}
this.FillRoot();
}
开发者ID:Dr1N,项目名称:Regedit,代码行数:26,代码来源:Main.cs
示例19: ThongKeTonKho_Load
private void ThongKeTonKho_Load(object sender, EventArgs e)
{
listView1.View = View.Details;
ColumnHeader colSTT = new ColumnHeader();
colSTT.Text = "STT";
colSTT.Width = 100;
ColumnHeader colMaNhanVien = new ColumnHeader();
colMaNhanVien.Text = "Mã Sản Phẩm";
colMaNhanVien.Width = 150;
ColumnHeader colTenNhanVien = new ColumnHeader();
colTenNhanVien.Text = "Tên Sản Phẩm";
colTenNhanVien.Width = 150;
ColumnHeader colNgaySinh = new ColumnHeader();
colNgaySinh.Text = "Tháng";
colNgaySinh.Width = 70;
ColumnHeader colDiaChi = new ColumnHeader();
colDiaChi.Text = "Năm";
colDiaChi.Width = 70;
ColumnHeader colDienThoai = new ColumnHeader();
colDienThoai.Text = "Tồn Kho";
colDienThoai.Width = 90;
listView1.Columns.Add(colSTT);
listView1.Columns.Add(colMaNhanVien);
listView1.Columns.Add(colTenNhanVien);
listView1.Columns.Add(colNgaySinh);
listView1.Columns.Add(colDiaChi);
listView1.Columns.Add(colDienThoai);
}
开发者ID:Hoai-Thanh,项目名称:Supermarket-Management-Software,代码行数:30,代码来源:ThongKeTonKho.cs
示例20: Sel
public void Sel(System.Windows.Forms.ListView Alv)
{
string sql;
string [] lstitm = new string [4];
Alv.Columns.RemoveAt(2);
System.Windows.Forms.ColumnHeader Sel_dltt = new System.Windows.Forms.ColumnHeader();
System.Windows.Forms.ColumnHeader Sel_dlttid = new System.Windows.Forms.ColumnHeader();
Alv.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
Sel_dlttid,
Sel_dltt});
Sel_dlttid.Text = "Suppliertype ID";
Sel_dlttid.Width = 40;
Sel_dltt.Text = "Suppliertype";
Sel_dltt.Width = 180;
// get the first suiteable title and return it
CatV workDS = new CatV();
sql = String.Format("Select * from tdbadmin.tdbv_cat where s_id = {0} order by bez", tdb.User.Ulangid);
FillDS(workDS, sql, new string[] { "tdbv_cat" });
foreach (CatV.tdbv_catRow Rwork in workDS.tdbv_cat)
{
lstitm[0] = Convert.ToString(Rwork.CAT_ID);
lstitm[1] = Rwork.BEZ;
lstitm[2] = Convert.ToString(Rwork.SUPTYPID);
lstitm[3] = Rwork.SUPTYP;
Alv.Items.Add(new ListViewItem(lstitm));
}
}
开发者ID:oeli,项目名称:yafra,代码行数:28,代码来源:Gcat.cs
注:本文中的System.Windows.Forms.ColumnHeader类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论