资源简介
MultiColumnComboBoxEx(1.2)主要功能:1)下拉框和文本框中显示多列;2)指定显示的列及其顺序;3)设定框高与项高;4)提供Items.IndexOf代替函数ItemIndexOf;5)支持RightToLeft(RTL)。具体实现请参考:http://blog.csdn.net/hulihui/archive/2009/02/01/3856824.aspx。
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace TestComboBox
{
public partial class Form1 : Form
{
DataTable dataTable;
Student[] studentArray;
List studentList;
public Form1()
{
InitializeComponent();
}
private void CreateDataSource()
{
// Populate using a DataTable
dataTable = new DataTable(“Employees“);
dataTable.Columns.Add(“Employee ID“ typeof(string));
dataTable.Columns.Add(“Name“ typeof(string));
dataTable.Columns.Add(“Job“ typeof(string));
dataTable.Rows.Add(new string[] { “D1“ “Natalia“ “Developer“ });
dataTable.Rows.Add(new string[] { “D2“ “Jonathan“ “Developer“ });
dataTable.Rows.Add(new string[] { “D3“ “Jake“ “Developer“ });
dataTable.Rows.Add(new string[] { “D4“ “Abraham“ “Developer“ });
dataTable.Rows.Add(new string[] { “T1“ “Mary“ “Team Lead“ });
dataTable.Rows.Add(new string[] { “PM1“ “Calvin“ “Project Manager“ });
dataTable.Rows.Add(new string[] { “T2“ “Sarah“ “Team Lead“ });
dataTable.Rows.Add(new string[] { “D12“ “Monica“ “Developer“ });
dataTable.Rows.Add(new string[] { “D13“ “Donna“ “Developer“ });
multiColumnComboBoxEx1.DataSource = dataTable;
multiColumnComboBoxEx1.DisplayMember = “Employee ID“;
multiColumnComboBoxEx1.ValueMember = “Name“;
// Populate using a collection
studentArray = new Student[]
{
new Student(“Andrew White“ 10) new Student(“Thomas Smith“ 10) new Student(“Alice Brown“ 11)
new Student(“Lana Jones“ 10) new Student(“Jason Smith“ 9) new Student(“Amamda Williams“ 11)
};
multiColumnComboBoxEx2.DataSource = studentArray;
multiColumnComboBoxEx2.DisplayMember = multiColumnComboBoxEx2.ValueMember = “Name“;
// Drop-down list (non-editable)
studentList = new List(studentArray);
multiColumnComboBoxEx3.DataSource = studentList;
multiColumnComboBoxEx3.DisplayMember = “Name“;
// Trying to use as a regular combobox
multiColumnComboBoxEx4.Items.Add(“Cat“);
multiColumnComboBoxEx4.Items.Add(“Tiger“);
multiColumnComboBoxEx4.Items.Add(“Lion“);
multiColumnComboBoxEx4.Items.Add(“Cheetah“);
multiColumnComboBoxEx4.Items.Add(“abcdefghijklmnopqrstuvwxyz“);
multiColumnComboBoxEx4.SelectedIndex = 0;
}
public class Student
{
private string name;
private int age;
public Student(string name
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2009-01-30 09:45 MultiColumnComboBoxEx\
目录 0 2009-01-30 09:46 MultiColumnComboBoxEx\bin\
文件 36864 2009-02-18 23:43 MultiColumnComboBoxEx\bin\MultiColumnComboBoxExDemo.exe
目录 0 2009-01-30 09:46 MultiColumnComboBoxEx\Properties\
文件 5612 2009-01-29 17:34 MultiColumnComboBoxEx\Properties\Resources.resx
文件 249 2009-01-29 17:34 MultiColumnComboBoxEx\Properties\Settings.settings
文件 2844 2009-01-30 09:47 MultiColumnComboBoxEx\Properties\Resources.Designer.cs
文件 1108 2009-01-30 09:47 MultiColumnComboBoxEx\Properties\Settings.Designer.cs
文件 1269 2009-01-31 08:49 MultiColumnComboBoxEx\Properties\AssemblyInfo.cs
文件 31150 2009-02-18 23:44 MultiColumnComboBoxEx\MultiColumnComboBoxEx.cs
文件 473 2009-01-30 13:58 MultiColumnComboBoxEx\Program.cs
文件 12155 2009-02-18 23:43 MultiColumnComboBoxEx\Form1.designer.cs
文件 5486 2009-02-18 23:43 MultiColumnComboBoxEx\Form1.cs
文件 423 2009-02-07 09:29 MultiColumnComboBoxEx\ClassDiagram1.cd
文件 5814 2009-02-18 23:43 MultiColumnComboBoxEx\Form1.resx
文件 21504 2009-02-18 23:44 MultiColumnComboBoxEx\MultiColumnComboBoxExDemo.suo
文件 938 2009-01-31 08:49 MultiColumnComboBoxEx\MultiColumnComboBoxExDemo.sln
文件 3467 2009-02-06 16:22 MultiColumnComboBoxEx\MultiColumnComboBoxExDemo.csproj
- 上一篇:asp 学生信息管理系统
- 下一篇:VB+ASP+ACCESS网络验证
相关资源
- Aspose.Words 18.7破解版本,含.net core版本
- Aspose.word.dll文件,修复The document app
- Aspose.Cellsdll 18.4+demo.zip 支持Excel各种
- 医药进销存管理系统源码
- 网上订餐系统源码
- 排课系统C#&ASP;.net内有三个样本
- Net.asp BLL+DAL+Web实现三层架构,自带增
- 水污染扩散模型共享平台
- Cracking Digital VLSI Verification Interview:
- 腾飞在线小说网源码(附带需求分析
- 微信公众号支付Dome项目刚上线,把
- 用ASP写的电子购物网站
- 仿淘宝网Asp项目
- Aspose.Words
- Asp与ajax前后端交互
- 手表销售系統(。NET版)
- aspose.cells 最新破解版
- 员工绩效考核系统源码
- (2018.11最新破解版)Aspose.Words 18.11破
- Aspose插件与pdf2swf与flashpaper弄的在线浏
- aspose.word.dll for 18.4.zip,项目亲测,无
- C#开发英语字典
- 东东堂返利网源码
- mvc5身份认证 MvcIdentity
- C# 超市管理系统(asp.net)
- C# 隐藏文件夹
- ASP在线考试系统(带源码)
评论
共有 条评论