| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1085 人关注过本帖
标题:控件问题
只看楼主 加入收藏
雪雨星风
Rank: 1
来 自:北京
等 级:新手上路
威 望:1
帖 子:566
专家分:0
注 册:2007-10-11
结帖率:100%
收藏
 问题点数:0 回复次数:3 
控件问题
帮忙看下怎么排列不乱            谢谢各位了
        private void button2_Click(object sender, EventArgs e)
        {
            listView1.Dock = DockStyle.None;
            button2.Dock = DockStyle.Top;
            button1.SendToBack();
            button1.Dock = DockStyle.Top;
            button3.Dock = DockStyle.Bottom;
            button4.Dock = DockStyle.Bottom;
            button5.Dock = DockStyle.Bottom;
            listView1.Dock = DockStyle.Bottom;
            listView1.Clear();
            listView1.Items.Add("近期工作记录", "近期工作记录", 3);
            listView1.Items.Add("近期工作计划", "近期工作计划", 4);
        }               

        private void button3_Click(object sender, EventArgs e)
        {
            listView1.Dock = DockStyle.None;
            button3.Dock = DockStyle.Top;
            button2.SendToBack();
            button2.Dock = DockStyle.Top;
            button1.Dock = DockStyle.Bottom;
            button4.Dock = DockStyle.Bottom;
            button5.Dock = DockStyle.Bottom;
            listView1.Dock = DockStyle.Bottom;
            listView1.Clear();
            listView1.Items.Add("近期工作记录", "近期工作记录", 5);
            listView1.Items.Add("近期工作计划", "近期工作计划", 6);
        }

        private void button4_Click(object sender, EventArgs e)
        {
            listView1.Dock = DockStyle.None;
            button4.Dock = DockStyle.Top;
            button3.SendToBack();
            button3.Dock = DockStyle.Top;
            button2.Dock = DockStyle.Bottom;
            button1.Dock = DockStyle.Bottom;
            button5.Dock = DockStyle.Bottom;
            listView1.Dock = DockStyle.Bottom;
            listView1.Clear();
            listView1.Items.Add("编辑工作进度报告", "编辑工作进度报告", 7);
            listView1.Items.Add("编辑项目设计图", "编辑项目设计图", 8);
        }

        private void button5_Click(object sender, EventArgs e)
        {
            listView1.Dock = DockStyle.None;
            button5.SendToBack();
            button5.Dock = DockStyle.Top;
            button4.SendToBack();
            button4.Dock = DockStyle.Top;
            button3.SendToBack();
            button3.Dock = DockStyle.Top;
            button2.SendToBack();
            button2.Dock = DockStyle.Top;
            button1.SendToBack();
            button1.Dock = DockStyle.Top;
            listView1.Dock = DockStyle.Bottom;
            listView1.Clear();
            listView1.Items.Add("编辑工作进度报告", "编辑工作进度报告", 9);
            listView1.Items.Add("编辑项目设计图", "编辑项目设计图", 10);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            listView1.Dock = DockStyle.None;
            button1.Dock = DockStyle.Top;
            button2.Dock = DockStyle.Bottom;
            button3.Dock = DockStyle.Bottom;
            button4.Dock = DockStyle.Bottom;
            button5.SendToBack();
            button5.Dock = DockStyle.Bottom;
            listView1.BringToFront();
            listView1.Dock = DockStyle.Bottom;
            listView1.Clear();
            listView1.Items.Add("设置上下班时间", "设置上下班时间", 0);
            listView1.Items.Add("是否启用短信提醒", "是否启用短信提醒", 1);
            listView1.Items.Add("设置密码", "设置密码", 2);
        }
搜索更多相关主题的帖子: DockStyle 控件 Bottom Top sender 
2008-01-17 15:36
雪雨星风
Rank: 1
来 自:北京
等 级:新手上路
威 望:1
帖 子:566
专家分:0
注 册:2007-10-11
收藏
得分:0 
大家帮忙看下,急用~!!!!!!谢谢了

C#发烧友QQ群1:5953354   QQ群2:68096127  QQ群3:30217249  QQ群4:37023079   为了更好方便大家交流学习,请不要重复加群
2008-01-17 19:41
雪雨星风
Rank: 1
来 自:北京
等 级:新手上路
威 望:1
帖 子:566
专家分:0
注 册:2007-10-11
收藏
得分:0 

C#发烧友QQ群1:5953354   QQ群2:68096127  QQ群3:30217249  QQ群4:37023079   为了更好方便大家交流学习,请不要重复加群
2008-01-17 19:41
天使不哭
Rank: 6Rank: 6
等 级:贵宾
威 望:23
帖 子:677
专家分:22
注 册:2006-7-9
收藏
得分:0 
不知道你想干什么

C#Winform技术群:25380362
博客:http:///boyliupan/
2008-01-18 03:19
快速回复:控件问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.040227 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved