tabcontrol不给力,标题不能改解决方法。直接上源码,不注释。
2011-04-19 13:27
211 查看
Rectangle tabArea1;
Rectangle tabArea2;
RectangleF tabTextArea1;
RectangleF tabTextArea2;
tabArea1 = tabControl1.GetTabRect(0);
tabArea2 = tabControl1.GetTabRect(1); ;
tabTextArea1 = (RectangleF)tabControl1.GetTabRect(0);
tabTextArea2 = (RectangleF)tabControl1.GetTabRect(1);
Graphics g = e.Graphics;
Pen p = new Pen(Color.Black);
Font font = new Font("宋体", 9.0f);
SolidBrush brush = new SolidBrush(Color.Silver);
e.Graphics.FillRectangle(brush, tabControl1.Bounds);
brush = new SolidBrush(Color.LightGray);
e.Graphics.FillRectangle(brush, e.Bounds);
brush = new SolidBrush(Color.WhiteSmoke);
g.FillRectangle(brush, tabTextArea1);
g.FillRectangle(brush, tabTextArea2);
brush = new SolidBrush(Color.Black);
StringFormat sf = new StringFormat();
sf.LineAlignment = StringAlignment.Center;
sf.Alignment = StringAlignment.Center;
g.DrawString(" 酒店管理 ", font, brush, tabTextArea1, sf);
g.DrawString("酒店区域管理", font, brush, tabTextArea2, sf);
Rectangle tabArea2;
RectangleF tabTextArea1;
RectangleF tabTextArea2;
tabArea1 = tabControl1.GetTabRect(0);
tabArea2 = tabControl1.GetTabRect(1); ;
tabTextArea1 = (RectangleF)tabControl1.GetTabRect(0);
tabTextArea2 = (RectangleF)tabControl1.GetTabRect(1);
Graphics g = e.Graphics;
Pen p = new Pen(Color.Black);
Font font = new Font("宋体", 9.0f);
SolidBrush brush = new SolidBrush(Color.Silver);
e.Graphics.FillRectangle(brush, tabControl1.Bounds);
brush = new SolidBrush(Color.LightGray);
e.Graphics.FillRectangle(brush, e.Bounds);
brush = new SolidBrush(Color.WhiteSmoke);
g.FillRectangle(brush, tabTextArea1);
g.FillRectangle(brush, tabTextArea2);
brush = new SolidBrush(Color.Black);
StringFormat sf = new StringFormat();
sf.LineAlignment = StringAlignment.Center;
sf.Alignment = StringAlignment.Center;
g.DrawString(" 酒店管理 ", font, brush, tabTextArea1, sf);
g.DrawString("酒店区域管理", font, brush, tabTextArea2, sf);
相关文章推荐
- myeclipse中直接复制的项目或项目改名后不能正常运行的解决方法
- 微信小程序按钮不能跳转Tab的解决方法
- Eclipse web项目导入到myeclipse中Tomcat不能直接部署解决方法
- jQuery EasyUI Tabs关闭Tab时不能完全释放内存解决方法
- Linux图形桌面窗口没有标题栏,不能移动,关闭,最小化的解决方法
- 当标题不能显示完整的解决方法
- mongodb在secondary不能直接获取primary的信息解决方法
- Android的项目不能直接引用可移植类库的项目解决方法
- jQuery EasyUI Tabs关闭Tab时不能完全释放内存解决方法
- jar包链接的源码,中文注释为乱码的解决方法
- Eclipse web工程导入到myeclipse中Tomcat不能直接部署之解决方法
- 虚拟机安装CentOS6.4用“桥接:直接连接到物理网线”不能上网的原因及解决方法
- Android 导入android源码有错,R.java文件不能自动生成解决方法
- csdn视频链接不能直接播放,而是跳转到视频列表的解决方法
- 导入android源码有错,R.java文件不能自动生成解决方法
- Xcode升级8.0后注释快捷键不能使用的解决方法
- 局域网中文件服务器上的.Net程序不能被直接运行的解决方法
- Excel 不能直接打开文件的解决方法
- 直接从github上clone ceph 源码,编译 Ceph 的时候报错的解决方法
- xcode8 升级后注释快捷键不能使用的解决方法