用FlowLayoutPanel布局控件,如outlook的联系人的卡片模式那样。现在的问题是每个人的卡片都被排列在第一个位置,致使只能看见一个人的卡片模式,其他的都被遮盖住了。请问这是什么原因?谢谢
代码类似如下
MainFlowLayoutPanel.Controls.Clear();
MainFlowLayoutPanel.SuspendLayout();
foreach (UserCard item in UserCards)
{
MainFlowLayoutPanel.Controls.Add(item);
}
UserCard 为包含图片姓名等的自定义控件。
代码类似如下
MainFlowLayoutPanel.Controls.Clear();
MainFlowLayoutPanel.SuspendLayout();
foreach (UserCard item in UserCards)
{
MainFlowLayoutPanel.Controls.Add(item);
}
UserCard 为包含图片姓名等的自定义控件。
解决方案 »
- 统计datagridview相同项的数量。
- Repeater嵌套Repeater,内层Repeater放置RadioButtonList
- MSSQL2000连接数据库问题
- .net 反编译 用什么反编译工具能将一个dll反编译成一个个类导出来呢?
- 问:在treeView控件中如何动态加入数据库中的数据显示在treeview上
- 关于窗体显示后再执行一些代码的问题
- C# Control.ControlCollection 问题,求解
- c#如何保证封装性?
- OleDbCommand从多个表中查询结果到类型化的DataSet,这样的思路能行吗。
- 如何得到磁盘的剩余空间???
- C#做多媒体导航系统
- "选项"模块如何存储数据
// this.flowLayoutPanel1.SuspendLayout(); //这个去掉
for(int i = 0;i < 10;i++)
{
this.flowLayoutPanel1.Controls.Add(new Button());
}
// this.flowLayoutPanel1.SuspendLayout(); //这个去掉
for(int i = 0;i < 10;i++)
{
this.flowLayoutPanel1.Controls.Add(new Button());
}