简体   繁体   English

winforms - 状态栏标签的工具提示未显示

[英]winforms - tooltip of statusbar labels not showing up

I have a couple of labels in status bar, on which I have set tooltip. 我在状态栏中有几个标签,我在其上设置了工具提示。

statusLblWeek.Text = weeklyHrs.ToString();
statusLblWeek.ToolTipText = " Consumption of this week " + statusLblWeek.Text;

Status labels are displayed correctly but the tooltip is not showing up. 状态标签显示正确但工具提示未显示。 Why? 为什么?

Use property StatusStrip.ShowItemToolTips 使用属性StatusStrip.ShowItemToolTips

True if ToolTips are shown for the StatusStrip; 如果为StatusStrip显示工具提示,则为真; otherwise, false. 否则,错误。 The default is false. 默认值为false。

statusStrip1.ShowItemToolTips = true;
statusLblWeek.Text = weeklyHrs.ToString();
statusLblWeek.ToolTipText = " Consumption of this week " + statusLblWeek.Text;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM