怎么在ListView中添加控件

likefxy 2009-08-14 01:44:25
怎么 在能在ListView中其中的一列上加上combox恩 等待回答
...全文
150 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
likefxy 2009-08-14
  • 打赏
  • 举报
回复
。。。。。
CCppMfc 2009-08-14
  • 打赏
  • 举报
回复
DataGridViewColumn Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
DataGridViewColumn Column2 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
DataGridViewColumn Column3 = new System.Windows.Forms.DataGridViewComboBoxColumn();
DataGridViewColumn Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();

System.Windows.Forms.DataGridView dataGridView1 = new System.Windows.Forms.DataGridView();
dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
Column1,
Column2,
Column3,
Column4});
likefxy 2009-08-14
  • 打赏
  • 举报
回复
给点 代码 啊! 谢谢啊
CCppMfc 2009-08-14
  • 打赏
  • 举报
回复
用DataGridView
北京的雾霾天 2009-08-14
  • 打赏
  • 举报
回复
用如下的方法获取到列或子列的矩形区域,然后动态的加一个ComboBox控件到ListView的Controls,并把控件Bounds到这个矩形。
ListView.GetItemRect 方法 (Int32, ItemBoundsPortion)

110,534

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧