社区
C#
帖子详情
请问状态栏这个控件怎么用啊
xyjchinese
2006-11-30 09:50:11
请问状态栏这个控件怎么用啊,我已经托到form里了,可是不会用,不知道怎么写,给我个小例子就行了,平台C#2005
...全文
218
4
打赏
收藏
请问状态栏这个控件怎么用啊
请问状态栏这个控件怎么用啊,我已经托到form里了,可是不会用,不知道怎么写,给我个小例子就行了,平台C#2005
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
xyjchinese
2006-12-01
打赏
举报
回复
msdn里的那个例子我看不懂,帮忙说说怎么用StatusStrip这个状态栏控件
kings23
2006-12-01
打赏
举报
回复
MSDN是好东西
dyw31415926
2006-12-01
打赏
举报
回复
估计楼主只是用做简单用途的,那好办
public Form1()
{
InitializeComponent();
StatusStrip statusStrip1 = new System.Windows.Forms.StatusStrip();
ToolStripStatusLabel toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
//
// statusStrip1
//
statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
toolStripStatusLabel1});
statusStrip1.Location = new System.Drawing.Point(0, 244);
statusStrip1.Name = "statusStrip1";
statusStrip1.Size = new System.Drawing.Size(292, 22);
statusStrip1.TabIndex = 2;
statusStrip1.Text = "statusStrip1";
statusStrip1.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.statusStrip1_ItemClicked);
//
// toolStripStatusLabel1
//
toolStripStatusLabel1.Name = "toolStripStatusLabel1";
toolStripStatusLabel1.Size = new System.Drawing.Size(131, 17);
toolStripStatusLabel1.Text = "toolStripStatusLabel1";
toolStripStatusLabel1.Text = "你要显示的内容";
this.Controls.Add(statusStrip1);
}
----------------------------------------
toolStripStatusLabel1.Text = "你要显示的内容";
liujia_0421
2006-11-30
打赏
举报
回复
MSDN上的例子,不过不是拖的,动态生成的,意思应该差不多...
自己看下,或者看下MSDN吧,上面讲得也很清楚了..
using System;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication4
{
public class Form1 : Form
{
private StatusStrip statusStrip1;
private ToolStripStatusLabel toolStripStatusLabel1;
public Form1()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.Run(new Form1());
}
private void InitializeComponent()
{
statusStrip1 = new System.Windows.Forms.StatusStrip();
toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
statusStrip1.SuspendLayout();
SuspendLayout();
//
// The following code example demonstrates the syntax for setting
// various StatusStrip properties.
statusStrip1.Dock = System.Windows.Forms.DockStyle.Top;
statusStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Visible;
statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
toolStripStatusLabel1});
statusStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
statusStrip1.Location = new System.Drawing.Point(0, 0);
statusStrip1.Name = "statusStrip1";
statusStrip1.ShowItemToolTips = true;
statusStrip1.Size = new System.Drawing.Size(292, 22);
statusStrip1.SizingGrip = false;
statusStrip1.Stretch = false;
statusStrip1.TabIndex = 0;
statusStrip1.Text = "statusStrip1";
//
// toolStripStatusLabel1
//
toolStripStatusLabel1.Name = "toolStripStatusLabel1";
toolStripStatusLabel1.Size = new System.Drawing.Size(109, 17);
toolStripStatusLabel1.Text = "toolStripStatusLabel1";
//
// Form1
//
ClientSize = new System.Drawing.Size(292, 273);
Controls.Add(statusStrip1);
Name = "Form1";
statusStrip1.ResumeLayout(false);
statusStrip1.PerformLayout();
ResumeLayout(false);
PerformLayout();
}
}
}
Winform开发全套31个UI组件开源共享]
15. StatusStrip和ToolStrip:
状态栏
和工具栏,提供额外的功能或状态信息。 16. GroupBox:用于分组相关
控件
。 17. LinkLabel:链接标签,可以模拟网页链接效果。 18. TrackBar:滑块
控件
,用户可以通过拖动来调整值...
Android ScrollView向上滑动
控件
顶部悬浮效果实现
同时,也可以通过设置
状态栏
颜色来增强吸顶效果,使得悬浮
控件
与
状态栏
无缝融合。 通过以上步骤,我们就成功实现了Android ScrollView向上滑动时
控件
顶部悬浮的效果。这种效果不仅提高了用户的操作便利性,也使界面...
【2013 duilib入门简明教程 -- 完整的自绘标题栏(8) 】 的按钮图片资源
这个教程“2013 duilib入门简明教程 -- 完整的自绘标题栏(8)”聚焦于如何使用Duilib来创建自定义的标题栏,其中包括对按钮图片资源的处理。在Windows应用程序中,标题栏通常包含窗口控制按钮,如最小化、最大化和...
鸡啄米:VS2010-MFC编程入门教程(1-55).docx
### VS2010-MFC编程入门教程知识点总结 #### 一、VS2010/MFC开发环境 - **前言**: ... - **
状态栏
功能**:介绍
状态栏
的作用及应用场景。 - **使用方法**:指导如何使用
状态栏
,包括显示信息、更新内容等。
状态栏
中增加
控件
在QMainWindow的
状态栏
中增加
控件
C#
111,119
社区成员
642,545
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章