C# 向StatusBar状态栏控件中添加窗格面板
- 资源大小:54.95 kB
- 上传时间:2021-06-29
- 下载次数:0次
- 浏览次数:1次
- 资源积分:1积分
-
标 签:
C#源码
资 源 简 介
C# 向StatusBar状态栏控件中添加窗格面板及文字,也就是把窗口的状态栏分栏,分隔成若干个小区域,显示不同的信息,比如文字提示或图标等。
向StatusBar控件添加窗格面板
StatusBar statusBar1=new StatusBar();
statusBar1.Panels.Add("中华人民共和国");
statusBar1.Panels.Add("重庆市");
statusBar1.Panels.Add("罗斌");
statusBar1.Panels[0].AutoSize = StatusBarPanelAutoSize.Contents;
statusBar1.Panels[1].AutoSize = StatusBarPanelAutoSize.Spring;
statusBar1.Panels[2].AutoSize = StatusBarPanelAutoSize.Contents;
statusBar1.Panels[0].BorderStyle =StatusBarPanelBorderStyle.Raised;
statusBar1.Panels[1].BorderStyle = StatusBarPanelBorderStyle.Sunken;
statusBar1.Panels[2].BorderStyle = StatusBarPanelBorderStyle.Raised;
statusBar1.Panels[2].Icon = new System.Drawing.Icon( @"Error.ico");
statusBar1.ShowPanels = true;
this.Controls.Add(statusBar1);
文 件 列 表
srcfans.com
StatusBar
MyForm
bin
Release
MyForm.exe
StatusBar
StatusBar
MyForm
bin
Release
error.ico
srcfans.com