winforms - tooltip of statusbar labels not showing up

て烟熏妆下的殇ゞ 提交于 2019-12-06 19:01:07

问题


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?


回答1:


Use property StatusStrip.ShowItemToolTips

True if ToolTips are shown for the StatusStrip; otherwise, false. The default is false.

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


来源:https://stackoverflow.com/questions/4427339/winforms-tooltip-of-statusbar-labels-not-showing-up

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!