splitContainer 中设置 右边PANEL的宽,怎么设置?我点关闭右边PANEL的宽为0

hmis168 2010-07-08 03:22:44
splitContainer 中设置 右边PANEL的宽,怎么设置?我点关闭右边PANEL的宽为0 ,点展开右边PANEL的宽为200
...全文
290 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
LovingAlison 2010-07-08
  • 打赏
  • 举报
回复
108为this.splitContainer1.Panel1设计时候的宽度
LovingAlison 2010-07-08
  • 打赏
  • 举报
回复

void SetPanel(int intType)
{
if (intType == 0)
{
this.splitContainer1.Size = new System.Drawing.Size(this.splitContainer1.Panel1.Width, this.splitContainer1.Panel1.Height);
this.splitContainer1.SplitterDistance = 108;
}
else
{
this.splitContainer1.Size = new System.Drawing.Size(this.splitContainer1.Panel1.Width+200, this.splitContainer1.Panel1.Height);
this.splitContainer1.SplitterDistance = 108;
}
}

111,120

社区成员

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

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

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